198
4
4 Instructions4.5.4 Data Rotation and Shift
RCL: Rotation left with carry
◆
Overview
When driving conditions are met, the bit pattern in D with the carry ag M8022 is rotated K bit places to the
left on every execution of the ROL instruction. The higher bits with the carry ag that are rotated out of D ll
the lower bits of D.
RCL D n
Rotation left with
carry
Applicable model:
H3U
D Operand to be
rotated
Address of the word element that stores the data
16-bit instruction
(5 steps)
RCL: Continuous
execution
RCLP: Pulse
execution
32-bit instruction (9
steps)
DRCL: Continuous
execution
DRCLP: Pulse
execution
n Number of bit
places rotated
on every
execution
Value range: 1 ≤ n ≤ 16 (16-bit operation); 1 ≤ n ≤ 32
(32-bit operation)
◆
Operands
Operand
Bit Element Word Element
System·User System·User Bit Designation Indexed Address Constant
Real
Number
D X Y M T C S SM D R T C SD KnX KnY KnM KnS KnSM
V,Z
Modication K H E
n X Y M T C S SM D R T C SD KnX KnY KnM KnS KnSM
V,Z
Modication K H E
Note: The elements in gray background are supported.
◆
Function
The bit pattern in D with the carry ag M8022 is rotated n bit places to the left. The instruction of the pulse
execution type is generally used.
When the 32-bit instruction is executed, the register variable occupies two consecutive units.
When KnY, KnM, and KnS are specied in D, only K4 (16-bit operation) and K8 (32-bit operation) are valid.
Example:
Higher bits
Higher bits
carry flag
carry flag
Higher bits
Right rotation with
Lower bits
Lower bits
After every
execution
Lower bits
Lower bits
After every
execution
Higher bits
Left rotation with
1 000000000010011
1 1 11000000000
M20
RCRP D20K3
1
M8022
M8022 0
n=3
1 0 1 1 100000000000
1 000000000000101
0
M80221
n=4
M20
RCLPD20 K4
M8022
010