RRD
Rotate bit pairs in A and (HL) right
7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 | |
---|---|---|---|---|---|---|---|---|
1 | 1 | 1 | 0 | 1 | 1 | 0 | 1 | ED |
0 | 1 | 1 | 0 | 0 | 1 | 1 | 1 | 67 |
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 |
| ||||||||
---|---|---|---|---|---|---|---|---|---|
s | set if result negative | ||||||||
z | set if result is 0 | ||||||||
h | reset | ||||||||
p/v | set if parity even, reset if parity odd |
Opcode Matrix
(HL) | |
---|---|
Op |
RRD (HL)
ED67218 |
Instruction
Opcode hexSize bytesCycle count
| Memory |
Last modified November 16, 2021: Add flags to rot operations (2eee171)