124 / 132 page

Handshake Solutions
HT80C51 User Manual
80C51 Family Instruction Set – Instruction definitions
Page 124 of 132
© Philips Electronics N.V. 2005
RR A
Function: Rotate Accumulator Right
Description: The eight bits in the Accumulator are rotated one bit to the right. Bit 0 is rotated into the bit 7 posi-
tion. No flags are affected.
Example: The Accumulator holds the value 0C5H (11000101B). The instruction,
RR A
leaves the Accumulator holding the value 0E2H (11100010B) with the carry unaffected.
Bytes: 1
Cycles: 1
Encoding:
Operation: RR
(An)
← (An+1), n = 0 – 6
(A7)
← (A0)
RRC A
Function: Rotate Accumulator Right through the Carry flag
Description: The eight bits in the Accumulator and the carry flag are together rotated one bit to the right. Bit 0
moves into the carry flag; the original state of the carry flag moves into the bit 7 position. No other
flags are affected.
Example: The Accumulator holds the value 0C5H (11000101B), and the carry is zero. The instruction,
RRC A
leaves the Accumulator holding the value 62 (01100010B) with the carry set.
Bytes: 1
Cycles: 1
Encoding:
Operation: RRC
(An)
← (An+1), n = 0 – 6
(A7)
← (C)
(C)
← (A0)
0
0
0
0
0
0
1
1
0
0
0
1
0
0
1
1