
Chapter 5. Application instructions
5-30
5.5.2
ROR, RORP, DROR, DRORP
ROR
(Rotate right)
FUN(34) ROR
FUN(36) DROR
FUN(35) RORP
FUN(37) DRORP
Applicable
CPU
All CPUs
Available Device
Flag
Instructions
M
P
K
L
F
T
C
S
D
#D Integer
Steps
Error
(F110)
Zero
(F111)
Carry
(F112)
ROR(P)
DROR(P)
O O O O*
O O
O O
3
O
O
* Available only when do not use computer link module or data link module
1) Functions
-
ROR(P) : Rotates 16 bits of the device specified at [ D ] in right direction.
-
The LSB will be transferred to the MSB and carry flag (F112)
-
DROR(P) : Rotates 32-bits of the device specified as [ D+1, D] in right direction.
-
The LSB of [ D ] will be transferred to the MSB of [ D+1 ] and carry flag.
Operand setting
ROR
RORP
DROR
DRORP
D
D
The device to be rotated
right by ROR instruction.
D
D
D
C
F
E
9
8
B
A
5
4
7
6
1
0
3
2
Carry flag
16 bits
D
16 bits
D + 1
Carry flag