Wednesday, March 2, 2016

8051 RRC Instruction

Rotate Accumulator Right through Carry flag

InstructionRRC A
FunctionRotate Accumulator Right through Carry flag
Encoding0 0 0 1 0 0 1 1
OperationAn+1 = An WHERE n = 0 TO 6
A0 = C
C = A7
DescriptionThe 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.
Flags AffectedC AC F0 RS1 RS0 OV P
ExampleThe Accumulator holds the value 0C5H (11000101B), the carry is zero. The following instruction,
leaves the Accumulator holding the value 62 (01100010B) with the carry set.
Bytes: Number of bytes required to encode the instruction.
Cycles: Number of instruction cycles required to execute the instruction. Note that there are 12 oscillator cycles to one instruction cycle on a standard 8051.
Encoding: Lists the byte encoding for the instruction.
Operation: Lists, step-by-step, the operations performed by the instruction.
Flags Affected: are highlighted in Bold

Related topics:
8051 Logical Operation Instructions   |   8051 ANL Instruction   |   8051 ORL Instruction   |   8051 XRL Instruction   |   8051 CLR Instruction   |   8051 CPL Instruction   |   8051 RL Instruction   |   8051 RR Instruction   |   8051 RLC Instruction   |   8051 SWAP Instruction

List of topics: 8051

No comments:

Post a Comment