7-38
7.2 Rotation Instructions
7.2.4 Left rotation of 32-bit data
DROL, DRCL
7.2.4
Left rotation of 32-bit data
DROL, DRCL
Function
DROL(P)
(1) Rotates 32-bit data of the device specified for
, 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 the
DROL instruction.
(2) When a bit device is specified for
, a rotation is performed within the device range set by
digit specification. The number of bits that rotate is the remainder of n divided by ‘number of
points by digit specification’.
For example, when n 31 and ‘number of points by digit specification’ 24 bits, the
remainder of 31/24 1 is 7, thus the data are rotated 7 bits.
DROL(P)
DRCL(P)
P: Executing condition
:
indicates any of the following
instructions.
DROL
DROLP
DRCL
DRCLP
Input argument,
EN:
Executing condition
:Bit
n:
Number of rotations (0 to 31)
:ANY16
Output argument,
ENO:
Execution result
:Bit
d:
Start number of the device to be rotated
:ANY16
Setting
data
Internal device
R, ZR
J
\
U
\G
Zn
Constant
K, H
Others
Bit
Word
Bit
Word
n
−
−
−
Universal
UD
High
Performance
Structured ladder
ST
D
ROL
EN
ENO
n
d
D
ROL
(EN,
n
, d);
ENO:=
d
d
b2
b16
b31
b17
b30 b29 b28 b27
b18
b15 b1
4
b5 b
4
b3
C
arr
y
flag
(SM700)
b1 b0
n-
b
it rotation
d
d
Summary of Contents for MELSEC Q Series
Page 1: ...Structured Programming Manual Mitsubishi Programmable Controller QCPU Common Instructions ...
Page 2: ......
Page 14: ...A 12 MEMO ...
Page 340: ...6 178 MEMO MTR ...
Page 708: ...7 368 MEMO ...
Page 776: ...8 68 MEMO ...
Page 796: ...9 20 MEMO ...
Page 804: ...App 8 MEMO ...
Page 812: ...Index 8 MEMO ...
Page 815: ......