RLD

Rotate bit pairs in A and (HL) left
Visualisation of the RLD instruction
76543210
11101101ED
011011116F

The contents of the low-order four bits (bits 3, 2, 1, and 0) of the memory location (HL) are copied to the high-order four bits (7, 6, 5, and 4) of that same memory location; the previous contents of those high-order four bits are copied to the low-order four bits of the Accumulator (Register A); and the previous contents of the low-order four bits of the Accumulator are copied to the low-order four bits of memory location (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
RLD (HL)
ED6F218
Opcode Matrix Legend
Instruction Opcode hexSize bytesCycle count
 Memory

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