![Samsung S3F84B8 Скачать руководство пользователя страница 195](http://html.mh-extra.com/html/samsung/s3f84b8/s3f84b8_user-manual_347832195.webp)
S3F84B8_UM_REV 1.00
6 INSTRUCTION SET
6-73
6.3.60 RRC — ROTATE RIGHT THROUGH CARRY
RRC
dst
Operation
: dst
(7)
C
C
dst (0)
dst
(n)
dst (n + 1), n = 0–6
The contents of destination operand and carry flag are rotated right one bit position. The initial
value of bit zero (LSB) replaces the carry flag; the initial value of carry flag replaces bit 7 (MSB).
7
0
C
Flags
:
C
: Set if the bit rotated from the least significant bit position (bit zero) is “1”.
Z
: Set if the result is “0”; cleared otherwise.
S
: Set if the result bit 7 is set; cleared otherwise.
V
: Set if the arithmetic overflow occurred, that is, if the sign of destination changes during
rotation; cleared otherwise.
D
: Unaffected.
H
: Unaffected.
Format
:
Bytes Cycles
Opcode
(Hex)
Addr Mode
dst
opc
dst
2
4
C0 R
4
C1
IR
Examples
:
Given register 00H = 55H, register 01H = 02H, register 02H = 17H, and C = “0”:
RRC 00H
Register 00H = 2AH, C = “1”
RRC @01H
Register 01H = 02H, register 02H = 0BH, C = “1”
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 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”.