Increment Decrement Instructions
How to decode increment and decrement instructions from binary
7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 | |
---|---|---|---|---|---|---|---|---|
0 | 0 | X | X | D | 0 | 1 | 1 | 16-bit |
0 | 0 | r | 1 | 0 | D | 8-bit | ||
(IX+d) or (IY+d) | ||||||||
1 | 1 | Z | 1 | 1 | 1 | 0 | 1 | DD or FD prefix |
0 | 0 | 1 | 1 | 0 | 1 | 0 | D | |
d | ||||||||
IX or IY | ||||||||
1 | 1 | Z | 1 | 1 | 1 | 0 | 1 | DD or FD prefix |
0 | 0 | 1 | 0 | D | 0 | 1 | 1 | |
7 | nn | 0 | ||||||
15 | 8 |
Register | r |
---|---|
B | 000 |
C | 001 |
D | 010 |
E | 011 |
H | 100 |
L | 101 |
A | 111 |
Instruction | XX |
---|---|
BC | 00 |
DE | 01 |
HL | 10 |
A | 11 |
Direction | D |
---|---|
INC | 0 |
DEC | 1 |
Register | Z |
---|---|
IX | 0 |
IY | 1 |
Last modified November 16, 2021: Optimise decoding pages (f08ceb7)