EasyManua.ls Logo

Atmel 8051 - Page 58

Atmel 8051
113 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
The 8051 Instruction Set
1-57 Atmel 8051 Microcontrollers Hardware Manual
4316B–8051–02/04
1.14.43 RR A
1.14.44 RRC 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 position. No flags
are affected.
Example: The Accumulator holds the value 0C5H (11000101B). The following instruction,
RR A
leaves the Accumulator holding the value 0E2H (11100010B) with the carry unaffected.
Bytes: 1
Cycles: 1
Encoding: 00000011
Operation: RR
(A
n
) (A
n
+ 1) n = 0 - 6
(A
7
) (A
0
)
Function: Rotate Accumulator Right through 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 value of the carry flag moves into the bit 7 position. No other flags are affected.
Example: The Accumulator holds the value 0C5H (11000101B), the carry is zero. The following instruction,
RRC A
leaves the Accumulator holding the value 62 (01100010B) with the carry set.
Bytes: 1
Cycles: 1
Encoding: 00010011
Operation: RRC
(A
n
) (A
n
+ 1) n = 0 - 6
(A
7
) (C)
(C) (A
0
)

Related product manuals