Chapter 7 Second Development Platform VP3000
324
API Instruction code Operand Function
30 D ROR P D, n
Rotate right
Type
Operand
Bit devices Word devices
16-bit instruction (5 steps)
ROR
Continuous
execution
type
RORP
Pulse
execution
type
32-bit instruction (9 steps)
DROR
Continuous
execution
type
DRORP
Pulse
execution
type
Associated flag: M1022, Carry flag
X Y M K H KnX KnY KnM T C D
D
n
Caution for using operand:
If D is designated as KnY, KnM, only K4 (16-bit) is valid.
Scope of n = K1–K16 (16-bit)
Description
D: device to be rotated
n: number of bits to be rotated in 1 rotation
This instruction rotates the device content designated by D to the right for n bits.
This instruction adopts pulse execution instructions (RORP).
Example
When X0 = OFFON, the 16 bits (4 bits as a group) in D10 rotates to the right, as shown in the
figure below. The bit marked with ※ is sent to carry flag M1022.