Omron CP1E-N@@D@-@ Computer Hardware User Manual


 
2 Instructions
2-32
CP1E CPU Unit Instructions Reference Manual(W483)
Hint
SETA
SETA(530) can be used to turn ON bits in data areas that are normally accessed by words only, such
as the DM areas.
RSTA
RSTA(531) can be used to turn OFF bits in data areas that are normally accessed by words only,
such as the DM areas.
Sample program
SETA
When CIO 0.00 is turned ON in the following example, the 20 bits (0014 hexadecimal) beginning
with bit 5 of CIO 100 are turned ON.
RSTA
When CIO 0.00 is turned ON in the following example, the 20 bits (0014 hexadecimal) beginning
with bit 3 of CIO 100 are turned OFF.
RSTA
RSTA(531) turns OFF N2 bits, beginning
from bit N1 of D, and continuing to the left
(more-significant bits). All other bits are
left unchanged. (No changes will be
made if N2 is set to 0.)
Bits turned OFF by RSTA(531) can be
turned ON by any other instructions, not
just SETA(530).
D
D+1
D+2
15 0
N2 bits are
reset to 0 (OFF).
N1
000
0
000
0.00
D
N1
N2
SETA
100
&5
&20
D: 100
101
15 1112 478350
N2: 20 bits
N1: Bit 5
1
111111111
1111111111
0.00
D
N1
N2
RSTA
100
&3
&20
D: 100
101
15 1112 47830
0
0000000
000000000000
N2: 20 bits
N1: Bit 3