RRCΒΆ
- RRC M
- Rotate Right Circular
- Description
- Performs a right shift on
M; the 0th bit ofMis copied into the carry and into the 7th bit ofM.
- Uses
- Retrieving consecutive bits of a byte in a loop, starting from the right, without affecting the source data (after eight iterations)
- Results
Register/Flag 8-bit M
SflagSet if the result is negative; else reset ZflagSet if the result is 0; else reset HflagReset P/VflagSet if the result has even parity; else reset NflagReset Cflag0th bit of M- Allowed Instructions
Instruction Opcode CC (ADL/non-ADL) CC (.S) CC (.L) rr a $CB, $0F 2F X X rr b $CB, $08 2F X X rr c $CB, $09 2F X X rr d $CB, $0A 2F X X rr e $CB, $0B 2F X X rr h $CB, $0C 2F X X rr l $CB, $0D 2F X X rr (hl) $CB, $0E 2F + 1R + 1W + 1 3F + 1R + 1W + 1 3F + 1R + 1W + 1 rr (ix+n) $DD, $CB, n, $0E 4F + 1R + 1W + 1 5F + 1R + 1W + 1 5F + 1R + 1W + 1 rr (iy+n) $FD, $CB, n, $0E 4F + 1R + 1W + 1 5F + 1R + 1W + 1 5F + 1R + 1W + 1 - Notes
- Unlike
RR, the initial state of the carry flag has no effect on the result of this instruction.
- Unlike
- See Also
- RLC, RR, RRCA, SRA, SRL