intd.
M~@-51 PROGRAMMER’SGUIDE AND INSTRUCTIONSET
RR A
Functiorx
Description:
Example:
Bytes:
cycles:
Encoding:
Operation:
RRC A
Rotate AccumulatorRight
Theeightbitsin the Aeoumulatorare rotated onebit to the right.BitOisrotated intothebit 7
position.No flagsare affected.
The Accumulatorholdsthe valueOC5H(11COO1O1B).The instruction,
RRA
leavesthe Aecmmdatorholdingthe value OE2H(111OOOIOB)with the carry unattested.
1
1
0000 0011
RR
(An) + (An + 1) n = O – 6
(A7) - (AO)
Description:
Example:
Bytes:
cycles:
Encoding:
Operation:
Rotate AeeumulatorRight through Carry flag
The
eightbits in the Accumulatorand the carry flagare togetherrotated onebit to the right.
Bit O movesinto the carry tlag; the originrdvalue of the carry flag movesinto the bit 7
position.No other figs are affected.
The Accumulatorholdsthe valueOC5H(11OOO1O1B),the carry is zero. The instruction,
RRC A
leavesthe Accumulatorholdingthe value 62 (O11OOO1OB)withthe carry set.
1
1
0001
0011
RRc
(An) + (h +
1) n = O – 6
(A7)- (C)
(C) + (AO)
2-67