333
ROL, ROLP, RCL, RCLP
1
2
3
4
4
6
7
8
7.2
R
otation instr
uction
7.2.2
R
OL, ROLP, RCL, R
C
LP
: Head number of the devices to rotate (BIN 16 bits)
n
: Number of rotations (0 to 15) (BIN 32 bits)
Function
ROL
(1) Rotates the 16-bit data of the device designated at , not including the carry flag, n-bits to the left.
The carry flag turns ON or OFF depending on its status prior to the execution of ROL instruction.
(2) When a bit device is designated for , a rotation is performed within the device range specified by digit specification.
The number of bits by which a rotation is executed is the remainder of n/(specified number of bits).
For example, when n 15 and (specified number of bits) 12 bits, the remainder of 15/12 1 is "3", and the data is
rotated 3 bits.
(3) Specify any of 0 to 15 as n.
If the value specified as n is 16 or greater, the remainder of n / 16 is used for rotation.
For example, when n 18, the data is rotated 2 bits to the left since the remainder of 18/16 1 is "2".
ROL, ROLP, RCL, RCLPLeft rotation of 16-bit data
7.2.2
ROL, ROLP, RCL, RCLP
Setting
Data
Internal Devices
R, ZR
J \
U \G
Zn
Constants
K, H
Other
Bit
Word
Bit
Word
––
––
n
––
Basic
Process
High
performance
Redundant Universal
LCPU
Command
Command
P
D
n
D
n
ROL, RCL
ROLP, RCLP
indicates an instruction s
y
mbol of ROL/RCL.
D
D
D
b9
b15
b10
b1
4
b13 b12 b11
b8 b7 b6 b5 b
4
b3 b2 b1 b0
b9
b15
b10
b1
4
b13 b12 b11
b8 b7 b6 b5 b
4
b3 b2 b1 b0
b9
b15
b10
b1
4
b13 b12 b11
b8 b7 b6 b5 b
4
b3 b2 b1 b0
b9
b15
b10
b1
4
b13 b12 b11
b8 b7 b6 b5 b
4
b3 b2 b1 b0
0
1
0
0
1
0
0
0
0
0
0
0
0
0
0
0
0
Carr
y
f
l
ag
(
SM700
)
0
0
0
1
1
0
0
0
0
0
0
0
0
0
0
0
D
D
D
D
Va
l
ue
of
b15
Carr
y
f
l
ag
(
SM700
)
L
eft
rotat
i
on
(
1
b
i
t
)
L
eft
rotat
i
on
(
1
b
i
t
)
1
Va
l
ue
of
b15
0
1
0
0
0
0
0
0
0
0
0
0
0
0
1
0
Va
l
ue
of
b15
Carr
y
f
l
ag
(
SM700
)
0
Va
l
ue
of
b15
Va
l
ue
of
b
(
16
-
n
)
Va
l
ue
of
b
(
16
-
n
)
Carr
y
f
l
ag
(
SM700
)
L
eft
rotat
i
on
(
n
b
i
ts
)
D