Rr Rotate Right - Samsung S3C8275X User Manual

8-bit cmos microcontrollers
Table of Contents

Advertisement

S3C8275X/F8275X/C8278X/F8278X/C8274X/F8274X
RR
— Rotate Right
RR
dst
C ← dst (0)
Operation:
dst (7) ← dst (0)
dst (n) ← dst (n + 1), n = 0–6
The contents of the destination operand are rotated right one bit position. The initial value of bit
zero (LSB) is moved to bit 7 (MSB) and also replaces the carry flag (C).
Flags:
C: Set if the bit rotated from the least significant bit position (bit zero) was "1".
Z: Set if the result is "0"; cleared otherwise.
S: Set if the result bit 7 is set; cleared otherwise.
V: Set if arithmetic overflow occurred, that is, if the sign of the destination changed during
rotation; cleared otherwise.
D: Unaffected.
H: Unaffected.
Format:
opc
Examples:
Given: Register 00H = 31H, register 01H = 02H, and register 02H = 17H:
RR
RR
In the first example, if general register 00H contains the value 31H (00110001B), the statement
"RR 00H" rotates this value one bit position to the right. The initial value of bit zero is moved to
bit 7, leaving the new value 98H (10011000B) in the destination register. The initial bit zero also
resets the C flag to "1" and the sign flag and overflow flag are also set to "1".
C
dst
00H
Register 00H = 98H, C = "1"
@01H
Register 01H = 02H, register 02H = 8BH, C = "1"
7
0
Bytes
2
INSTRUCTION SET
Cycles
Opcode
(Hex)
4
E0
4
E1
Addr Mode
dst
R
IR
6-73

Advertisement

Table of Contents
loading

This manual is also suitable for:

F8275xF8274xC8278xC8274xF8278x

Table of Contents