RRD

Rotate bit pairs in A and (HL) right
Visualisation of the RRD instruction
76543210
11101101ED
0110011167

The contents of the low-order four bits (bits 3, 2, 1, and 0) of memory location (HL) are copied to the low-order four bits of the Accumulator (Register A). The previous contents of the low-order four bits of the Accumulator are copied to the high-order four bits (7, 6, 5, and 4) of location (HL); and the previous contents of the high-order four bits of (HL) are copied to the low-order four bits of (HL). The contents of the high-order bits of the Accumulator are unaffected.

Flags Affected
Flags
sz-h-p/v--
sset if result negative
zset if result is 0
hreset
p/vset if parity even, reset if parity odd
Opcode Matrix
(HL)
Op
RRD (HL)
ED67218
Opcode Matrix Legend
Instruction Opcode hexSize bytesCycle count
 Memory

Last modified November 16, 2021: Add flags to rot operations (2eee171)