ABCDEFGHIJKLMNOPQRSTUVWXYZ
1
TypeInstructionByte sizeCyclesDescriptionEffects codedEffects explained
2
Arithadc a,(hl)17Adds (hl) and the carry flag to a.++V+++
C=desc; N=desc; P\V=OVFL; H=desc; Z=desc; S=desc;
*-P*++C=excp; N=____; P\V=PRTY; H=excp; Z=desc; S=desc;C', 'N', 'P/V', 'H', 'Z', 'S'C: the Carry flag. It is set when the last operation caused a register to step over zero in either direction.
3
Arithadc a,*27Adds * and the carry flag to a.++V+++
C=desc; N=desc; P\V=OVFL; H=desc; Z=desc; S=desc;
*0-*--C=excp; N=ZERO; P\V=____; H=excp; Z=____; S=____;- = unaffected
+ = affected as defined
P = detects parity
V = detects overflow
1 = set
0 = reset
* = exceptional
4
Arithadc a,a14Adds a and the carry flag to a.++V+++
C=desc; N=desc; P\V=OVFL; H=desc; Z=desc; S=desc;
++-+--C=desc; N=desc; P\V=____; H=desc; Z=____; S=____;
5
Arithadc a,b14Adds b and the carry flag to a.++V+++
C=desc; N=desc; P\V=OVFL; H=desc; Z=desc; S=desc;
++V+++C=desc; N=desc; P\V=OVFL; H=desc; Z=desc; S=desc;N: this bit indicates subtraction.
6
Arithadc a,c14Adds c and the carry flag to a.++V+++
C=desc; N=desc; P\V=OVFL; H=desc; Z=desc; S=desc;
+0-0--C=desc; N=ZERO; P\V=____; H=ZERO; Z=____; S=____;P/V: the Parity/Overflow flag, which has different meanings depending on which instruction alters it. When it is Parity, it tells you whether the number of set (1) bits in the register is odd or even. When it means Overflow, it indicates overflowing (leaving the 0...127 or -128...-1 intervals) by being set. Actually, in the case of certain operations the contents of the flip-flop controlling the interrupt also appear here.
7
Arithadc a,d14Adds d and the carry flag to a.++V+++
C=desc; N=desc; P\V=OVFL; H=desc; Z=desc; S=desc;
-+V+++C=____; N=desc; P\V=OVFL; H=desc; Z=desc; S=desc;
8
Arithadc a,e14Adds e and the carry flag to a.++V+++
C=desc; N=desc; P\V=OVFL; H=desc; Z=desc; S=desc;
------C=____; N=____; P\V=____; H=____; Z=____; S=____;
9
Arithadc a,h14Adds h and the carry flag to a.++V+++
C=desc; N=desc; P\V=OVFL; H=desc; Z=desc; S=desc;
-1-1--C=____; N=ONE ; P\V=____; H=ONE ; Z=____; S=____;
10
Arithadc a,l14Adds l and the carry flag to a.++V+++
C=desc; N=desc; P\V=OVFL; H=desc; Z=desc; S=desc;
00P0++C=ZERO; N=ZERO; P\V=PRTY; H=ZERO; Z=desc; S=desc;
11
Arithadd a,(hl)17Adds (hl) to a.++V+++
C=desc; N=desc; P\V=OVFL; H=desc; Z=desc; S=desc;
00P1++C=ZERO; N=ZERO; P\V=PRTY; H=ONE ; Z=desc; S=desc;
12
Arithadd a,*27Adds * to a.++V+++
C=desc; N=desc; P\V=OVFL; H=desc; Z=desc; S=desc;
10-0--C=ONE ; N=ZERO; P\V=____; H=ZERO; Z=____; S=____;
13
Arithadd a,a14Adds a to a.++V+++
C=desc; N=desc; P\V=OVFL; H=desc; Z=desc; S=desc;
-0P0++C=____; N=ZERO; P\V=PRTY; H=ZERO; Z=desc; S=desc;
14
Arithadd a,b14Adds b to a.++V+++
C=desc; N=desc; P\V=OVFL; H=desc; Z=desc; S=desc;
-0*0--C=____; N=ZERO; P\V=excp; H=ZERO; Z=desc; S=desc;H: the BCD Half Carry flag. It is set when there is a carry transfer from bit 3 to bit 4, and it is used for packed BCD correction.
15
Arithadd a,c14Adds c to a.++V+++
C=desc; N=desc; P\V=OVFL; H=desc; Z=desc; S=desc;
-1*+++C=____; N=ONE ; P\V=excp; H=decs; Z=desc; S=desc;
16
Arithadd a,d14Adds d to a.++V+++
C=desc; N=desc; P\V=OVFL; H=desc; Z=desc; S=desc;
-1--*-C=____; N=ONE ; P\V=____; H=____; Z=excp; S=____;
17
Arithadd a,e14Adds e to a.++V+++
C=desc; N=desc; P\V=OVFL; H=desc; Z=desc; S=desc;
-000--C=____; N=ZERO; P\V=ZERO; H=ZERO; Z=desc; S=desc;Z: the Zero flag, which is set if one of the registers was set to zero during the preceding operation. Note that not all operations resulting in zero alter this flag!
18
Arithadd a,h14Adds h to a.++V+++
C=desc; N=desc; P\V=OVFL; H=desc; Z=desc; S=desc;
-10+++C=____; N=ONE ; P\V=ZERO; H=decs; Z=desc; S=desc;
19
Arithadd a,l14Adds l to a.++V+++
C=desc; N=desc; P\V=OVFL; H=desc; Z=desc; S=desc;
-1--1-C=____; N=ONE ; P\V=____; H=____; Z=ONE ; S=____;
20
Arithadd hl,bc111The value of bc is added to hl.++-+--
C=desc; N=desc; P\V=____; H=desc; Z=____; S=____;
-0-1+-C=____; N=ZERO; P\V=____; H=ONE ; Z=desc; S=____;
21
Arithadd hl,de111The value of de is added to hl.++-+--
C=desc; N=desc; P\V=____; H=desc; Z=____; S=____;
+0P0++C=desc; N=ZERO; P\V=PRTY; H=ZERO; Z=desc; S=desc;S: the Sign flag, which is set if one of the registers changed its value from non-negative to negative. It is zero in all the other cases.
22
Arithadd hl,hl111The value of hl is added to hl.++-+--
C=desc; N=desc; P\V=____; H=desc; Z=____; S=____;
23
Arithdaa14Adjusts a for BCD addition and subtraction operations. Can be used to convert a value to hex.*-P*++
C=excp; N=____; P\V=PRTY; H=excp; Z=desc; S=desc;
24
Arithdec (hl)111Subtracts one from (hl).-+V+++
C=____; N=desc; P\V=OVFL; H=desc; Z=desc; S=desc;
25
Arithdec a14Subtracts one from a.-+V+++
C=____; N=desc; P\V=OVFL; H=desc; Z=desc; S=desc;
26
Arithdec b14Subtracts one from b.-+V+++
C=____; N=desc; P\V=OVFL; H=desc; Z=desc; S=desc;
27
Arithdec bc16Subtracts one from bc.------
C=____; N=____; P\V=____; H=____; Z=____; S=____;
28
Arithdec c14Subtracts one from c.-+V+++
C=____; N=desc; P\V=OVFL; H=desc; Z=desc; S=desc;
29
Arithdec d14Subtracts one from d.-+V+++
C=____; N=desc; P\V=OVFL; H=desc; Z=desc; S=desc;
30
Arithdec de16Subtracts one from de.------
C=____; N=____; P\V=____; H=____; Z=____; S=____;
31
Arithdec e14Subtracts one from e.-+V+++
C=____; N=desc; P\V=OVFL; H=desc; Z=desc; S=desc;
32
Arithdec h14Subtracts one from h.-+V+++
C=____; N=desc; P\V=OVFL; H=desc; Z=desc; S=desc;
33
Arithdec hl16Subtracts one from hl.------
C=____; N=____; P\V=____; H=____; Z=____; S=____;
34
Arithdec l14Subtracts one from l.-+V+++
C=____; N=desc; P\V=OVFL; H=desc; Z=desc; S=desc;
35
Arithinc (hl)111Adds one to (hl).-+V+++
C=____; N=desc; P\V=OVFL; H=desc; Z=desc; S=desc;
36
Arithinc a14Adds one to a.-+V+++
C=____; N=desc; P\V=OVFL; H=desc; Z=desc; S=desc;
37
Arithinc b14Adds one to b.-+V+++
C=____; N=desc; P\V=OVFL; H=desc; Z=desc; S=desc;
38
Arithinc bc16Adds one to bc.------
C=____; N=____; P\V=____; H=____; Z=____; S=____;
39
Arithinc c14Adds one to c.-+V+++
C=____; N=desc; P\V=OVFL; H=desc; Z=desc; S=desc;
40
Arithinc d14Adds one to d.-+V+++
C=____; N=desc; P\V=OVFL; H=desc; Z=desc; S=desc;
41
Arithinc de16Adds one to de.------
C=____; N=____; P\V=____; H=____; Z=____; S=____;
42
Arithinc e14Adds one to e.-+V+++
C=____; N=desc; P\V=OVFL; H=desc; Z=desc; S=desc;
43
Arithinc h14Adds one to h.-+V+++
C=____; N=desc; P\V=OVFL; H=desc; Z=desc; S=desc;
44
Arithinc hl16Adds one to hl.------
C=____; N=____; P\V=____; H=____; Z=____; S=____;
45
Arithinc l14Adds one to l.-+V+++
C=____; N=desc; P\V=OVFL; H=desc; Z=desc; S=desc;
46
Arithsbc a,(hl)17Subtracts (hl) and the carry flag from a.++V+++
C=desc; N=desc; P\V=OVFL; H=desc; Z=desc; S=desc;
47
Arithsbc a,*27Subtracts * and the carry flag from a.++V+++
C=desc; N=desc; P\V=OVFL; H=desc; Z=desc; S=desc;
48
Arithsbc a,a14Subtracts a and the carry flag from a.++V+++
C=desc; N=desc; P\V=OVFL; H=desc; Z=desc; S=desc;
49
Arithsbc a,b14Subtracts b and the carry flag from a.++V+++
C=desc; N=desc; P\V=OVFL; H=desc; Z=desc; S=desc;
50
Arithsbc a,c14Subtracts c and the carry flag from a.++V+++
C=desc; N=desc; P\V=OVFL; H=desc; Z=desc; S=desc;
51
Arithsbc a,d14Subtracts d and the carry flag from a.++V+++
C=desc; N=desc; P\V=OVFL; H=desc; Z=desc; S=desc;
52
Arithsbc a,e14Subtracts e and the carry flag from a.++V+++
C=desc; N=desc; P\V=OVFL; H=desc; Z=desc; S=desc;
53
Arithsbc a,h14Subtracts h and the carry flag from a.++V+++
C=desc; N=desc; P\V=OVFL; H=desc; Z=desc; S=desc;
54
Arithsbc a,l14Subtracts l and the carry flag from a.++V+++
C=desc; N=desc; P\V=OVFL; H=desc; Z=desc; S=desc;
55
Arithsub (hl)17Subtracts (hl) from a.++V+++
C=desc; N=desc; P\V=OVFL; H=desc; Z=desc; S=desc;
56
Arithsub *27Subtracts * from a.++V+++
C=desc; N=desc; P\V=OVFL; H=desc; Z=desc; S=desc;
57
Arithsub a14Subtracts a from a.++V+++
C=desc; N=desc; P\V=OVFL; H=desc; Z=desc; S=desc;
58
Arithsub b14Subtracts b from a.++V+++
C=desc; N=desc; P\V=OVFL; H=desc; Z=desc; S=desc;
59
Arithsub c14Subtracts c from a.++V+++
C=desc; N=desc; P\V=OVFL; H=desc; Z=desc; S=desc;
60
Arithsub d14Subtracts d from a.++V+++
C=desc; N=desc; P\V=OVFL; H=desc; Z=desc; S=desc;
61
Arithsub e14Subtracts e from a.++V+++
C=desc; N=desc; P\V=OVFL; H=desc; Z=desc; S=desc;
62
Arithsub h14Subtracts h from a.++V+++
C=desc; N=desc; P\V=OVFL; H=desc; Z=desc; S=desc;
63
Arithsub l14Subtracts l from a.++V+++
C=desc; N=desc; P\V=OVFL; H=desc; Z=desc; S=desc;
64
Bitsand (hl)17Bitwise AND on a with (hl).00P1++
C=ZERO; N=ZERO; P\V=PRTY; H=ONE ; Z=desc; S=desc;
65
Bitsand *27Bitwise AND on a with *.00P1++
C=ZERO; N=ZERO; P\V=PRTY; H=ONE ; Z=desc; S=desc;
66
Bitsand a14Bitwise AND on a with a.00P1++
C=ZERO; N=ZERO; P\V=PRTY; H=ONE ; Z=desc; S=desc;
67
Bitsand b14Bitwise AND on a with b.00P1++
C=ZERO; N=ZERO; P\V=PRTY; H=ONE ; Z=desc; S=desc;
68
Bitsand c14Bitwise AND on a with c.00P1++
C=ZERO; N=ZERO; P\V=PRTY; H=ONE ; Z=desc; S=desc;
69
Bitsand d14Bitwise AND on a with d.00P1++
C=ZERO; N=ZERO; P\V=PRTY; H=ONE ; Z=desc; S=desc;
70
Bitsand e14Bitwise AND on a with e.00P1++
C=ZERO; N=ZERO; P\V=PRTY; H=ONE ; Z=desc; S=desc;
71
Bitsand h14Bitwise AND on a with h.00P1++
C=ZERO; N=ZERO; P\V=PRTY; H=ONE ; Z=desc; S=desc;
72
Bitsand l14Bitwise AND on a with l.00P1++
C=ZERO; N=ZERO; P\V=PRTY; H=ONE ; Z=desc; S=desc;
73
Bitsccf14Inverts the carry flag.*0-*--
C=excp; N=ZERO; P\V=____; H=excp; Z=____; S=____;
74
Bitscpl14The contents of a are inverted (one's complement).-1-1--
C=____; N=ONE ; P\V=____; H=ONE ; Z=____; S=____;
75
Bitsor (hl)17Bitwise OR on a with (hl).00P0++
C=ZERO; N=ZERO; P\V=PRTY; H=ZERO; Z=desc; S=desc;
76
Bitsor *27Bitwise OR on a with *.00P0++
C=ZERO; N=ZERO; P\V=PRTY; H=ZERO; Z=desc; S=desc;
77
Bitsor a14Bitwise OR on a with a.00P0++
C=ZERO; N=ZERO; P\V=PRTY; H=ZERO; Z=desc; S=desc;
78
Bitsor b14Bitwise OR on a with b.00P0++
C=ZERO; N=ZERO; P\V=PRTY; H=ZERO; Z=desc; S=desc;
79
Bitsor c14Bitwise OR on a with c.00P0++
C=ZERO; N=ZERO; P\V=PRTY; H=ZERO; Z=desc; S=desc;
80
Bitsor d14Bitwise OR on a with d.00P0++
C=ZERO; N=ZERO; P\V=PRTY; H=ZERO; Z=desc; S=desc;
81
Bitsor e14Bitwise OR on a with e.00P0++
C=ZERO; N=ZERO; P\V=PRTY; H=ZERO; Z=desc; S=desc;
82
Bitsor h14Bitwise OR on a with h.00P0++
C=ZERO; N=ZERO; P\V=PRTY; H=ZERO; Z=desc; S=desc;
83
Bitsor l14Bitwise OR on a with l.00P0++
C=ZERO; N=ZERO; P\V=PRTY; H=ZERO; Z=desc; S=desc;
84
Bitsrla14The contents of a are rotated left one bit position. The contents of bit 7 are copied to the carry flag and the previous contents of the carry flag are copied to bit 0.+0-0--
C=desc; N=ZERO; P\V=____; H=ZERO; Z=____; S=____;
85
Bitsrlca14The contents of a are rotated left one bit position. The contents of bit 7 are copied to the carry flag and bit 0.+0-0--
C=desc; N=ZERO; P\V=____; H=ZERO; Z=____; S=____;
86
Bitsrra14The contents of a are rotated right one bit position. The contents of bit 0 are copied to the carry flag and the previous contents of the carry flag are copied to bit 7.+0-0--
C=desc; N=ZERO; P\V=____; H=ZERO; Z=____; S=____;
87
Bitsrrca14The contents of a are rotated right one bit position. The contents of bit 0 are copied to the carry flag and bit 7.+0-0--
C=desc; N=ZERO; P\V=____; H=ZERO; Z=____; S=____;
88
Bitsxor (hl)17Bitwise XOR on a with (hl).00P0++
C=ZERO; N=ZERO; P\V=PRTY; H=ZERO; Z=desc; S=desc;
89
Bitsxor *27Bitwise XOR on a with *.00P0++
C=ZERO; N=ZERO; P\V=PRTY; H=ZERO; Z=desc; S=desc;
90
Bitsxor a14Bitwise XOR on a with a.00P0++
C=ZERO; N=ZERO; P\V=PRTY; H=ZERO; Z=desc; S=desc;
91
Bitsxor b14Bitwise XOR on a with b.00P0++
C=ZERO; N=ZERO; P\V=PRTY; H=ZERO; Z=desc; S=desc;
92
Bitsxor c14Bitwise XOR on a with c.00P0++
C=ZERO; N=ZERO; P\V=PRTY; H=ZERO; Z=desc; S=desc;
93
Bitsxor d14Bitwise XOR on a with d.00P0++
C=ZERO; N=ZERO; P\V=PRTY; H=ZERO; Z=desc; S=desc;
94
Bitsxor e14Bitwise XOR on a with e.00P0++
C=ZERO; N=ZERO; P\V=PRTY; H=ZERO; Z=desc; S=desc;
95
Bitsxor h14Bitwise XOR on a with h.00P0++
C=ZERO; N=ZERO; P\V=PRTY; H=ZERO; Z=desc; S=desc;
96
Bitsxor l14Bitwise XOR on a with l.00P0++
C=ZERO; N=ZERO; P\V=PRTY; H=ZERO; Z=desc; S=desc;
97
Jumpcall **317The current pc value plus three is pushed onto the stack, then is loaded with **.------
C=____; N=____; P\V=____; H=____; Z=____; S=____;
98
Jumpjp (hl)14Loads the value of hl into pc.------
C=____; N=____; P\V=____; H=____; Z=____; S=____;
99
Jumpjp **310** is copied to pc.------
C=____; N=____; P\V=____; H=____; Z=____; S=____;
100
Jumpjr *212The signed value * is added to pc. The jump is measured from the start of the instruction opcode.------
C=____; N=____; P\V=____; H=____; Z=____; S=____;