Mnemonic |
Symbolic
Operation |
Flags
S Z H P/V N C |
Opcode
76 543 210 |
Hex |
Bytes |
M
Cycles |
Clock
Cycles |
Comments |
ADD
A, r |
A ¬ A + r |
↕ ↕ ↕ V 0 ↕ |
10 000 r |
|
1 |
1 |
4 |
r Reg
000 B
001 C
010 D
011 E
100 H
101 L
111 A
|
ADD
A, n |
A ¬ A + n |
↕ ↕ ↕ V 0 ↕ |
11 000 110
¬
n ® |
|
2 |
2 |
7 |
ADD
A, (HL) |
A ¬ A + (HL) |
↕ ↕ ↕ V 0 ↕ |
10 000 110 |
|
1 |
2 |
7 |
ADD A, (IX + d) |
A ¬ A + (IX
+ d) |
↕ ↕ ↕ V 0 ↕ |
11 011 101
10 000 110
¬ d
® |
DD |
3 |
5 |
19 |
ADD A, (IY + d) |
A ¬ A + (IY
+ d) |
↕ ↕ ↕ V 0 ↕ |
11 111 101
10 000 110
¬
d ® |
FD |
3 |
5 |
19 |
ADC
A, r |
A ¬ A + r + CY |
↕ ↕ ↕ V 0 ↕ |
10 001 r |
|
1 |
1 |
4 |
ADC
A, n |
A ¬ A + n + CY |
↕ ↕ ↕ V 0 ↕ |
11 001 110
¬
n ® |
|
2 |
2 |
7 |
ADC
A, (HL) |
A ¬ A + (HL) + CY |
↕ ↕ ↕ V 0 ↕ |
10 001 110 |
|
1 |
2 |
7 |
ADC A, (IX + d) |
A ¬ A + (IX
+ d) + CY |
↕ ↕ ↕ V 0 ↕ |
11 011 101
10 001 110
¬ d ® |
DD |
3 |
5 |
19 |
ADC A, (IY + d) |
A ¬ A + (IY
+ d) + CY |
↕ ↕ ↕ V 0 ↕ |
11 111 101
10 001 110
¬
d ® |
FD |
3 |
5 |
19 |
SUB
r |
A ¬ A - r |
↕ ↕ ↕ V 1 ↕ |
10 010 r |
|
1 |
1 |
4 |
SUB
n |
A ¬ A - n |
↕ ↕ ↕ V 1 ↕ |
11 010 110
¬
n ® |
|
2 |
2 |
7 |
SUB
(HL) |
A ¬ A - (HL) |
↕ ↕ ↕ V 1 ↕ |
10 010 110 |
|
1 |
2 |
7 |
SUB (IX + d) |
A ¬ A - (IX
+ d) |
↕ ↕ ↕ V 1 ↕ |
11 011 101
10 010 110
¬ d
® |
DD |
3 |
5 |
19 |
SUB (IY + d) |
A ¬ A - (IY
+ d) |
↕ ↕ ↕ V 1 ↕ |
11 111 101
10 010 110
¬
d ® |
FD |
3 |
5 |
19 |
SBC
A, r |
A ¬ A - r - CY |
↕ ↕ ↕ V 1 ↕ |
10 011 r |
|
1 |
1 |
4 |
SBC
A, n |
A ¬ A - n - CY |
↕ ↕ ↕ V 1 ↕ |
11 011 110
¬
n ® |
|
2 |
2 |
7 |
SBC
A, (HL) |
A ¬ A - (HL) - CY |
↕ ↕ ↕ V 1 ↕ |
10 011 110 |
|
1 |
2 |
7 |
SBC A, (IX + d) |
A ¬ A - (IX
+ d) - CY |
↕ ↕ ↕ V 1 ↕ |
11 011 101
10 011 110
¬ d ® |
DD |
3 |
5 |
19 |
SBC A, (IY + d) |
A ¬ A - (IY
+ d) - CY |
↕ ↕ ↕ V 1 ↕ |
11 111 101
10 011 110
¬
d ® |
FD |
3 |
5 |
19 |
CP r |
A - r |
↕ ↕ ↕ V 1 ↕ |
10 111 r |
|
1 |
1 |
4 |
CP
n |
A - n |
↕ ↕ ↕ V 1 ↕ |
11 111 110
¬
n ® |
|
2 |
2 |
7 |
CP
(HL) |
A - (HL) |
↕ ↕ ↕ V 1 ↕ |
10 111 110 |
|
1 |
2 |
7 |
CP (IX + d) |
A - (IX
+ d) |
↕ ↕ ↕ V 1 ↕ |
11 011 101
10 111 110
¬ d
® |
DD |
3 |
5 |
19 |
CP (IY + d) |
A - (IY
+ d) |
↕ ↕ ↕ V 1 ↕ |
11 111 101
10 111 110
¬
d ® |
FD |
3 |
5 |
19 |
AND
r |
A ¬ A and r |
↕ ↕ 1 P 0 0 |
10 100 r |
|
1 |
1 |
4 |
AND
n |
A ¬ A and n |
↕ ↕ 1 P 0 0 |
11 100 110
¬
n ® |
|
2 |
2 |
7 |
AND
(HL) |
A ¬ A and (HL) |
↕ ↕ 1 P 0 0 |
10 100 110 |
|
1 |
2 |
7 |
AND (IX + d) |
A ¬ A and (IX
+ d) |
↕ ↕ 1 P 0 0 |
11 011 101
10 100 110
¬ d ® |
DD |
3 |
5 |
19 |
AND (IY + d) |
A ¬ A and (IY
+ d) |
↕ ↕ 1 P 0 0 |
11 111 101
10 100 110
¬
d ® |
FD |
3 |
5 |
19 |
OR
r |
A ¬ A or r |
↕ ↕ 1 P 0 0 |
10 110 r |
|
1 |
1 |
4 |
OR
n |
A ¬ A or n |
↕ ↕ 1 P 0 0 |
11 110 110
¬
n ® |
|
2 |
2 |
7 |
OR
(HL) |
A ¬ A or (HL) |
↕ ↕ 1 P 0 0 |
10 110 110 |
|
1 |
2 |
7 |
OR (IX + d) |
A ¬ A or (IX
+ d) |
↕ ↕ 1 P 0 0 |
11 011 101
10 110 110
¬ d ® |
DD |
3 |
5 |
19 |
OR (IY + d) |
A ¬ A or (IY
+ d) |
↕ ↕ 1 P 0 0 |
11 111 101
10 110 110
¬
d ® |
FD |
3 |
5 |
19 |
XOR
r |
A ¬ A xor r |
↕ ↕ 1 P 0 0 |
10 101 r |
|
1 |
1 |
4 |
XOR
n |
A ¬ A xor n |
↕ ↕ 1 P 0 0 |
11 101 110
¬
n ® |
|
2 |
2 |
7 |
XOR
(HL) |
A ¬ A xor (HL) |
↕ ↕ 1 P 0 0 |
10 101 110 |
|
1 |
2 |
7 |
XOR (IX + d) |
A ¬ A xor (IX
+ d) |
↕ ↕ 1 P 0 0 |
11 011 101
10 101 110
¬ d ® |
DD |
3 |
5 |
19 |
XOR (IY + d) |
A ¬ A xor (IY
+ d) |
↕ ↕ 1 P 0 0 |
11 111 101
10 101 110
¬
d ® |
FD |
3 |
5 |
19 |
INC r |
r ¬ r + 1 |
↕ ↕ ↕ V 0 • |
00 r 100 |
|
1 |
1 |
4 |
INC
(HL) |
(HL) ¬ (HL) + 1 |
↕ ↕ ↕ V 0 • |
00 110 100 |
|
1 |
3 |
11 |
INC
(IX + d) |
(IX + d) ¬ (IX + d) + 1 |
↕ ↕ ↕ V 0 • |
11 011 101
00 110 100
¬
d ® |
DD |
3 |
6 |
23 |
INC (IY + d) |
(IY + d) ¬ (IY + d) + 1 |
↕ ↕ ↕ V 0 • |
11 111 101
00 110 100
¬
d ® |
FD |
3 |
6 |
23 |
DEC r |
r ¬ r - 1 |
↕ ↕ ↕ V 1 • |
00 r 101 |
|
1 |
1 |
4 |
DEC
(HL) |
(HL) ¬ (HL) - 1 |
↕ ↕ ↕ V 1 • |
00 110 101 |
|
1 |
3 |
11 |
DEC
(IX + d) |
(IX + d) ¬
(IX + d) -1 |
↕ ↕ ↕ V 1 • |
11 011 101
00 110 101
¬
d ® |
DD |
3 |
6 |
23 |
DEC (IY + d) |
(IY + d) ¬ (IY + d) - 1 |
↕ ↕ ↕ V 1 • |
11 111 101
00 110 101
¬
d ® |
FD |
3 |
6 |
23 |
DAA |
Converts Accumulator contents into packed BCD, following add or subtract with packed BCD operands |
↕ ↕ ↕ P • ↕ | 00 100 111 |
27 |
1 |
1 |
4 |
CPL |
_
A ¬ A |
• • 1 • 1 • |
00 101 111 |
2F |
1 |
1 |
4 |
One’s complement. |
NEG |
_
A ¬ A + 1 |
↕ ↕ ↕ V 1 ↕ |
11 101 101
01 000 100 |
ED
44 |
2 |
2 |
8 |
Two’s complement. |
Notes: |
The V symbol in the P/V flag column indicates that the P/V
flag contains the overflow of the operation.
Similarly the P symbol indicates parity.
r means any of the registers A, B, C, D, E, H, L.
CY means the carry flip-flop. |
Flag Notation: |
• = flag is not affected, 0 = flag is reset, 1 = flag is
set,
↕ = flag is set according to the result of the operation. |