RRDΒΆ

RRD
Rotate Right Decimal
Description
Moves the lower four bits of A (0-3) into the upper four bits of (HL) (4-7); moves the upper four bits of (HL) (4-7) into the lower four bits of (HL) (0-3); moves the lower four bits of (HL) (0-3) into the lower four bits of A (0-3).
../../_images/rrd.png
Uses
  • Shifting digits around with binary-coded decimal?
Results
Register/Flag 16-bit (non-ADL) 24-bit (ADL)
A and (HL) ../../_images/rrd1.png
S flag Set if A is negative; else reset
Z flag Set if A is 0; else reset
H flag Reset
P/V flag Set if A has even parity; else reset
N flag Reset
C flag Not affected
Allowed Instructions
Instruction Opcode CC (ADL/non-ADL) CC (.S) CC (.L)
rrd $ED, $67 2F + 1R + 1W + 1 3F + 1R + 1W + 1 3F + 1R + 1W + 1
See Also
DAA, RLD, RR, RRC