Rrc Rotate Right Through Carry - Samsung S3C8275X User Manual

8-bit cmos microcontrollers
Table of Contents

Advertisement

INSTRUCTION SET
RRC
— Rotate Right Through Carry
RRC
dst
dst (7) ← C
Operation:
C ← dst (0)
dst (n) ← dst (n + 1), n = 0–6
The contents of the destination operand and the carry flag are rotated right one bit position. The
initial value of bit zero (LSB) replaces the carry flag; the initial value of the carry flag replaces bit 7
(MSB).
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 = 55H, register 01H = 02H, register 02H = 17H, and C = "0":
RRC
RRC
In the first example, if general register 00H contains the value 55H (01010101B), the statement
"RRC 00H" rotates this value one bit position to the right. The initial value of bit zero ("1")
replaces the carry flag and the initial value of the C flag ("1") replaces bit 7. This leaves the new
value 2AH (00101010B) in destination register 00H. The sign flag and overflow flag are both
cleared to "0".
6-74
C
dst
00H
Register 00H = 2AH, C = "1"
@01H
Register 01H = 02H, register 02H = 0BH, C = "1"
S3C8275X/F8275X/C8278X/F8278X/C8274X/F8274X
7
0
Bytes
2
Cycles
Opcode
(Hex)
4
C0
4
C1
Addr Mode
dst
R
IR

Advertisement

Table of Contents
loading

This manual is also suitable for:

F8275xF8274xC8278xC8274xF8278x

Table of Contents