Chapter 6 Instruction Details
XBC E-Type Main Unit
6-143
Ver. 1
6.25.4 ROR4, ROR4P, ROR8, ROR8P
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)
ROR4(P)
ROR8(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) ROR4 (Nibble Rotate Right)
(1) Rotates D’s 4 bits for the number of n bits specified to the right bit by bit, and the lowest bit among 4 bits
will rotate to Carry Flag and the highest bit. (Rotation within 4 bits)
(2) If Carry is caused during rotation, Carry Flag will be set.
2) ROR8 (Byte Rotate Right)
(1) Rotates D’s 8 bits for the number of n bits specified to the right bit by bit, and the lowest bit among 8 bits
will rotate to Carry Flag and the highest bit. (Rotation within 8 bits)
(2) If Carry is caused during rotation, Carry Flag will be set.
3) Program Example
(1) If P01004=h00C3, Input Signal P00000 is changed to On from Off status, It rotates 2 Bits to the right bit by bit
and then h0033 is saved in P01004.
ROR4P P01004 2
P00000
ROR4, ROR8
ROR4P, ROR8P
D
means ROR4/ROR8
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...