4/17/98 6-151 Addressing Modes and Data Types
RR Rotate Right
Syntax: RR Rd, #data4
Operation:
Description: If the count operand is greater than 0, the destination operand is rotated right by the
number of bits specified in the immediate data operand. The data size may be 8 or 16 bits. The
number of bit positions shifted may be from 0 to 15. If the count operand is 0, no rotate is
performed.
Size: Byte, Word
Flags Updated: N, Z
Bytes: 2
Clocks: 4 + 1 for each 2 bits of shift
Encoding:
MSB LSB
(Rd)
count <- #data4
Do While (count not equal to 0)
(dest
msb
) <- (dest
0
)
(dest
n-1
) <- (dest
n
)
(count) <- count -1
End While
1 0 1 1 SZ 0 0 0 d d d d #data4