The RRC instruction
The RRC (Rotate Right through Carry) instruction performs a rotate-right operation on the contents of the accumulator.
The RRC instruction format
| Instruction | Description |
|---|---|
| RRC | This format is used to rotate the 8-bit value in register A to the right. |
Usage example
; Author: Evgeny Sergeevich Dovgopolov main: mvi a, 03h ; Load the hexadecimal value 03h into register A rrc ; Rotate the value in register A one bit to the right, ignoring the CY flag hlt ; Stop program execution
Example taken from the textbook "HANDYFAR - MASM (Evgeny Sergeevich Dovgopolov)".
Processor status flags
S
YesZ
YesAC
NoP
YesCY
Yes