RRA

Operation

n----------------------m
|  n-----------m  n--m |
v->|7-------->0|->|CY|-u
   v-----------u  v--u
         A

Mnemonic

RRA

Operands

None

b7b6b5b4b3b2b1b0
0 0 0 1 1 1 1 1$1F

Description

The contents of the Accumulator (Register A) are rotated right 1 bit position. Bit 0 is copied to the Carry flag and also to bit 7. Bit 0 is the least-significant bit.

Condition Bits Affected

Sis not affected.
Zis not affected.
His reset.
P/Vis not affected.
Nis reset.
Cis data from bit 0 of Accumulator.

Example

The Accumulator contains the following data:

76543210
00010001

Upon the execution of

	RRA

the Accumulator and Carry flag contains:

76543210C
100010001