EasyManua.ls Logo

Inovance H3U Series - Page 197

Inovance H3U Series
737 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
196
4
4 Instructions4.5.4 Data Rotation and Shift
ROL: Rotation left
Overview
When driving conditions are met, the bit pattern in D is rotated K bit places to the left on every execution of
the ROL instruction. The higher bits that are rotated out of D ll the lower bits of D.
ROL D n
Rotation left Applicable model:
H3U
D
Operand to be
rotated
Address of the word element that stores the data
16-bit instruction
(5 steps)
ROL: Continuous
execution
ROLP: Pulse
execution
32-bit instruction (9
steps)
DROL: Continuous
execution
DROLP: 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
Modication K H E
n X Y M T C S SM D R T C SD KnX KnY KnM KnS KnSM
V,Z
Modication K H E
Note: The elements in gray background are supported.
Function
The bit pattern in D 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 specied in D, only K4 (16-bit operation) and K8 (32-bit operation) are valid.
The status of the last bit rotated is copied to the carry ag.
Example:
Higher bits Higher bits
Higher bits
Right rotation
Lower bits
Lower bits
After every
execution
Lower bits
Lower bits
After every
execution
Higher bits
Left rotation
1 000000000010011
0 1 11000000000
M10
RORP D20 K3
M8022 0
n=3
1 0 1 1100000000000
1 000000000001011
M80221
n=4
M10
ROLP D20 K4
010

Table of Contents

Other manuals for Inovance H3U Series

Related product manuals