
7-40
ROL(P),RCL(P)
Operation Error
(1) There are no operation errors associated with the ROL(P) or RCL(P) instructions.
Program Example
(1) The following program rotates the contents of D0, not including the carry flag, 3 bits to the
left when XC is turned ON.
[Ladder Mode] [List Mode]
[Operation]
(2) The following program rotates the contents of D0, including the carry flag, 3 bits to the left
when XC is turned ON.
[Ladder Mode] [List Mode]
[Operation]
Step Instruction Device
000000000000
1111
100000000000011
b15 b8 b0b7
b0b7b15 b8
0
1
b14b13b12b11b10 b9 b6 b5 b4b3 b2 b1
b14b13b12b11b10 b9 b6 b5 b4b3 b2 b1
Carry flag
(SM700)
Carry flag
(SM700)
Contents of b15 to b13
before execution
Contents of b11 to b0
before execution
Content of b12
before execution
Content of b13
before execution
D0
D0
1
Step Instruction Device
000000000000
1111
1000000000000 1
b15 b8 b0
b7
b0
b7
b15 b8
1
*
b14b13b12b11b10 b9 b6 b5 b4b3 b2 b1
b14b13b12b11b10 b9 b6 b5 b4b3 b2 b1
Carry flag
(SM700)
Carry flag
(SM700)
Contents of b15 and b14
before execution
Contents of b11 to b0
before execution
Content of b12
before execution
Content of b13
before execution Content of carry flag SM700
D0
D0
1
* ON/OFF status of the carry flag depends on its status before the execution of RCL.
*