Chapter 6 Instruction Details
XBC E-Type Main Unit
6-141
Ver. 1
6.25.2 ROL4, ROL4P, ROL8, ROL8P
Instruction
Area Available
Step
Flag
P M K F L T C S Z D.x R.x
Co
nst.
U N D R
Error
(F110)
Zero
(F111)
Carry
(F112)
ROL4(P)
ROL8(P)
D O O O - O -
-
-
- O O -
-
-
-
-
2~4
-
-
O
n O O O - O O O - O -
- O O O O O
Operand
Description
Data Type
D
Data address to perform operation.
NIBBLE/BYTE
n
Number of bits to rotate to the left.
WORD
[Flag Set]
Flag
Description
Device Number
Carry
If Carry is caused during rotation, Carry Flag will be set.
F112
1) ROL4( Rotate Left)
(1) Rotates D’s 4 bits for the number of n bits specified to the left bit by bit. The highest bit among 4 bits will
rotate to Carry Flag and the lowest bit. (Rotation within 4 bits)
(2) If Carry is caused during rotation, Carry Flag will be set.
2) ROL8 (Double Rotate Left)
(1) Rotates D’s 8 bits for the number of n bits specified to the left bit by bit. The highest bit among 8 bits will
rotate to Carry Flag and the lowest bit. (Rotation within 8 bits)
(2) If Carry is caused during rotation, Carry Flag will be set.
3) Program Example
(1) For P01004~P01007=h3, when Input Signal P00000 is changed to On from Off status, it rotates 2 bits to
the left bit by bit, and then ‘hc’ will be saved in P01004~P01007.
ROL4P P01004 2
P00000
ROL4, ROL8
ROL4P, ROL8P
D
means ROL4/ROL8
P D
n
n
Command
Command
Summary of Contents for XBC-DN10E
Page 1: ......
Page 10: ...Table of Contents Table of Contents 6 10 10 CLEAR ALL PLC 29...