1 |
2 |
bporcella |
ADCsA_A = 'h8F,// ADC A,A ; 8F
|
2 |
|
|
ADCsA_B = 'h88,// ADC A,B ; 88
|
3 |
|
|
ADCsA_C = 'h89,// ADC A,C ; 89
|
4 |
|
|
ADCsA_D = 'h8A,// ADC A,D ; 8A
|
5 |
|
|
ADCsA_E = 'h8B,// ADC A,E ; 8B
|
6 |
|
|
ADCsA_H = 'h8C,// ADC A,H ; 8C
|
7 |
|
|
ADCsA_L = 'h8D,// ADC A,L ; 8D
|
8 |
|
|
ADCsA_N = 'hCE,// ADC A,N ; CE XX
|
9 |
|
|
ADDsA_A = 'h87,// ADD A,A ; 87
|
10 |
|
|
ADDsA_B = 'h80,// ADD A,B ; 80
|
11 |
|
|
ADDsA_C = 'h81,// ADD A,C ; 81
|
12 |
|
|
ADDsA_D = 'h82,// ADD A,D ; 82
|
13 |
|
|
ADDsA_E = 'h83,// ADD A,E ; 83
|
14 |
|
|
ADDsA_H = 'h84,// ADD A,H ; 84
|
15 |
|
|
ADDsA_L = 'h85,// ADD A,L ; 85
|
16 |
|
|
ADDsA_N = 'hC6,// ADD A,N ; C6 XX
|
17 |
|
|
ADDsHL_BC = 'h09,// ADD HL,BC ; 09
|
18 |
|
|
ADDsHL_DE = 'h19,// ADD HL,DE ; 19
|
19 |
|
|
ADDsHL_HL = 'h29,// ADD HL,HL ; 29
|
20 |
|
|
ADDsHL_SP = 'h39,// ADD HL,SP ; 39
|
21 |
|
|
ANDsA = 'hA7,// AND A ; A7
|
22 |
|
|
ANDsB = 'hA0,// AND B ; A0
|
23 |
|
|
ANDsC = 'hA1,// AND C ; A1
|
24 |
|
|
ANDsD = 'hA2,// AND D ; A2
|
25 |
|
|
ANDsE = 'hA3,// AND E ; A3
|
26 |
|
|
ANDsH = 'hA4,// AND H ; A4
|
27 |
|
|
ANDsL = 'hA5,// AND L ; A5
|
28 |
|
|
ANDsN = 'hE6,// AND N ; E6 XX
|
29 |
|
|
CCF = 'h3F,// CCF ; 3F
|
30 |
|
|
CPL = 'h2F,// CPL ; 2F
|
31 |
|
|
CPsA = 'hBF,// CP A ; BF
|
32 |
|
|
CPsB = 'hB8,// CP B ; B8
|
33 |
|
|
CPsC = 'hB9,// CP C ; B9
|
34 |
|
|
CPsD = 'hBA,// CP D ; BA
|
35 |
|
|
CPsE = 'hBB,// CP E ; BB
|
36 |
|
|
CPsH = 'hBC,// CP H ; BC
|
37 |
|
|
CPsL = 'hBD,// CP L ; BD
|
38 |
|
|
CPsN = 'hFE,// CP N ; FE XX
|
39 |
|
|
DAA = 'h27,// DAA ; 27
|
40 |
|
|
DECsA = 'h3D,// DEC A ; 3D
|
41 |
|
|
DECsB = 'h05,// DEC B ; 05
|
42 |
|
|
DECsBC = 'h0B,// DEC BC ; 0B
|
43 |
|
|
DECsC = 'h0D,// DEC C ; 0D
|
44 |
|
|
DECsD = 'h15,// DEC D ; 15
|
45 |
|
|
DECsDE = 'h1B,// DEC DE ; 1B
|
46 |
|
|
DECsE = 'h1D,// DEC E ; 1D
|
47 |
|
|
DECsH = 'h25,// DEC H ; 25
|
48 |
|
|
DECsHL = 'h2B,// DEC HL ; 2B
|
49 |
|
|
DECsL = 'h2D,// DEC L ; 2D
|
50 |
|
|
DECsSP = 'h3B,// DEC SP ; 3B
|
51 |
|
|
DI = 'hF3,// DI ; F3
|
52 |
|
|
EI = 'hFB,// EI ; FB
|
53 |
|
|
EXX = 'hD9,// EXX ; D9
|
54 |
|
|
EXsAF_AFp = 'h08,// EX AF,AF' ; 08
|
55 |
|
|
EXsDE_HL = 'hEB,// EX DE,HL ; EB
|
56 |
|
|
HALT = 'h76,// HALT ; 76
|
57 |
|
|
INCsA = 'h3C,// INC A ; 3C
|
58 |
|
|
INCsB = 'h04,// INC B ; 04
|
59 |
|
|
INCsBC = 'h03,// INC BC ; 03
|
60 |
|
|
INCsC = 'h0C,// INC C ; 0C
|
61 |
|
|
INCsD = 'h14,// INC D ; 14
|
62 |
|
|
INCsDE = 'h13,// INC DE ; 13
|
63 |
|
|
INCsE = 'h1C,// INC E ; 1C
|
64 |
|
|
INCsH = 'h24,// INC H ; 24
|
65 |
|
|
INCsHL = 'h23,// INC HL ; 23
|
66 |
|
|
INCsL = 'h2C,// INC L ; 2C
|
67 |
|
|
INCsSP = 'h33,// INC SP ; 33
|
68 |
|
|
LDsA_A = 'h7F,// LD A,A ; 7F
|
69 |
|
|
LDsA_B = 'h78,// LD A,B ; 78
|
70 |
|
|
LDsA_C = 'h79,// LD A,C ; 79
|
71 |
|
|
LDsA_D = 'h7A,// LD A,D ; 7A
|
72 |
|
|
LDsA_E = 'h7B,// LD A,E ; 7B
|
73 |
|
|
LDsA_H = 'h7C,// LD A,H ; 7C
|
74 |
|
|
LDsA_L = 'h7D,// LD A,L ; 7D
|
75 |
|
|
LDsA_N = 'h3E,// LD A,N ; 3E XX
|
76 |
|
|
LDsBC_nn = 'h01,// LD BC,NN ; 01 XX XX
|
77 |
|
|
LDsB_A = 'h47,// LD B,A ; 47
|
78 |
|
|
LDsB_B = 'h40,// LD B,B ; 40
|
79 |
|
|
LDsB_C = 'h41,// LD B,C ; 41
|
80 |
|
|
LDsB_D = 'h42,// LD B,D ; 42
|
81 |
|
|
LDsB_E = 'h43,// LD B,E ; 43
|
82 |
|
|
LDsB_H = 'h44,// LD B,H ; 44
|
83 |
|
|
LDsB_L = 'h45,// LD B,L ; 45
|
84 |
|
|
LDsB_N = 'h06,// LD B,N ; 06 XX
|
85 |
|
|
LDsC_A = 'h4F,// LD C,A ; 4F
|
86 |
|
|
LDsC_B = 'h48,// LD C,B ; 48
|
87 |
|
|
LDsC_C = 'h49,// LD C,C ; 49
|
88 |
|
|
LDsC_D = 'h4A,// LD C,D ; 4A
|
89 |
|
|
LDsC_E = 'h4B,// LD C,E ; 4B
|
90 |
|
|
LDsC_H = 'h4C,// LD C,H ; 4C
|
91 |
|
|
LDsC_L = 'h4D,// LD C,L ; 4D
|
92 |
|
|
LDsC_N = 'h0E,// LD C,N ; 0E XX
|
93 |
|
|
LDsDE_NN = 'h11,// LD DE,NN ; 11 XX XX
|
94 |
|
|
LDsD_A = 'h57,// LD D,A ; 57
|
95 |
|
|
LDsD_B = 'h50,// LD D,B ; 50
|
96 |
|
|
LDsD_C = 'h51,// LD D,C ; 51
|
97 |
|
|
LDsD_D = 'h52,// LD D,D ; 52
|
98 |
|
|
LDsD_E = 'h53,// LD D,E ; 53
|
99 |
|
|
LDsD_H = 'h54,// LD D,H ; 54
|
100 |
|
|
LDsD_L = 'h55,// LD D,L ; 55
|
101 |
|
|
LDsD_N = 'h16,// LD D,N ; 16 XX
|
102 |
|
|
LDsE_A = 'h5F,// LD E,A ; 5F
|
103 |
|
|
LDsE_B = 'h58,// LD E,B ; 58
|
104 |
|
|
LDsE_C = 'h59,// LD E,C ; 59
|
105 |
|
|
LDsE_D = 'h5A,// LD E,D ; 5A
|
106 |
|
|
LDsE_E = 'h5B,// LD E,E ; 5B
|
107 |
|
|
LDsE_H = 'h5C,// LD E,H ; 5C
|
108 |
|
|
LDsE_L = 'h5D,// LD E,L ; 5D
|
109 |
|
|
LDsE_N = 'h1E,// LD E,N ; 1E XX
|
110 |
|
|
LDsHL_NN = 'h21,// LD HL,NN ; 21 XX XX
|
111 |
|
|
LDsH_A = 'h67,// LD H,A ; 67
|
112 |
|
|
LDsH_B = 'h60,// LD H,B ; 60
|
113 |
|
|
LDsH_C = 'h61,// LD H,C ; 61
|
114 |
|
|
LDsH_D = 'h62,// LD H,D ; 62
|
115 |
|
|
LDsH_E = 'h63,// LD H,E ; 63
|
116 |
|
|
LDsH_H = 'h64,// LD H,H ; 64
|
117 |
|
|
LDsH_L = 'h65,// LD H,L ; 65
|
118 |
|
|
LDsH_N = 'h26,// LD H,N ; 26 XX
|
119 |
|
|
LDsL_A = 'h6F,// LD L,A ; 6F
|
120 |
|
|
LDsL_B = 'h68,// LD L,B ; 68
|
121 |
|
|
LDsL_C = 'h69,// LD L,C ; 69
|
122 |
|
|
LDsL_D = 'h6A,// LD L,D ; 6A
|
123 |
|
|
LDsL_E = 'h6B,// LD L,E ; 6B
|
124 |
|
|
LDsL_H = 'h6C,// LD L,H ; 6C
|
125 |
|
|
LDsL_L = 'h6D,// LD L,L ; 6D
|
126 |
|
|
LDsL_N = 'h2E,// LD L,N ; 2E XX
|
127 |
|
|
LDsSP_HL = 'hF9,// LD SP,HL ; F9
|
128 |
|
|
LDsSP_NN = 'h31,// LD SP,NN ; 31 XX XX
|
129 |
|
|
NOP = 'h00,// NOP ; 00
|
130 |
|
|
ORsA = 'hB7,// OR A ; B7
|
131 |
|
|
ORsB = 'hB0,// OR B ; B0
|
132 |
|
|
ORsC = 'hB1,// OR C ; B1
|
133 |
|
|
ORsD = 'hB2,// OR D ; B2
|
134 |
|
|
ORsE = 'hB3,// OR E ; B3
|
135 |
|
|
ORsH = 'hB4,// OR H ; B4
|
136 |
|
|
ORsL = 'hB5,// OR L ; B5
|
137 |
|
|
ORsN = 'hF6,// OR N ; F6 XX
|
138 |
|
|
RLA = 'h17,// RLA ; 17
|
139 |
|
|
RLCA = 'h07,// RLCA ; 07
|
140 |
|
|
RRA = 'h1F,// RRA ; 1F
|
141 |
|
|
RRCA = 'h0F,// RRCA ; 0F
|
142 |
|
|
SBCsA = 'h9F,// SBC A ; 9F
|
143 |
|
|
SBCsA_N = 'hDE,// SBC A,N ; DE XX
|
144 |
|
|
SBCsB = 'h98,// SBC B ; 98
|
145 |
|
|
SBCsC = 'h99,// SBC C ; 99
|
146 |
|
|
SBCsD = 'h9A,// SBC D ; 9A
|
147 |
|
|
SBCsE = 'h9B,// SBC E ; 9B
|
148 |
|
|
SBCsH = 'h9C,// SBC H ; 9C
|
149 |
|
|
SBCsL = 'h9D,// SBC L ; 9D
|
150 |
|
|
SCF = 'h37,// SCF ; 37
|
151 |
|
|
SUBsA = 'h97,// SUB A ; 97
|
152 |
|
|
SUBsB = 'h90,// SUB B ; 90
|
153 |
|
|
SUBsC = 'h91,// SUB C ; 91
|
154 |
|
|
SUBsD = 'h92,// SUB D ; 92
|
155 |
|
|
SUBsE = 'h93,// SUB E ; 93
|
156 |
|
|
SUBsH = 'h94,// SUB H ; 94
|
157 |
|
|
SUBsL = 'h95,// SUB L ; 95
|
158 |
|
|
SUBsN = 'hD6,// SUB N ; D6 XX
|
159 |
|
|
XORsA = 'hAF,// XOR A ; AF
|
160 |
|
|
XORsB = 'hA8,// XOR B ; A8
|
161 |
|
|
XORsC = 'hA9,// XOR C ; A9
|
162 |
|
|
XORsD = 'hAA,// XOR D ; AA
|
163 |
|
|
XORsE = 'hAB,// XOR E ; AB
|
164 |
|
|
XORsH = 'hAC,// XOR H ; AC
|
165 |
|
|
XORsL = 'hAD,// XOR L ; AD
|
166 |
|
|
XORsN = 'hEE,// XOR N ; EE XX
|
167 |
|
|
ED_SBCsHL_REG = 6'b01__0010, // compair with {ir[7:6],ir[3:0]}
|
168 |
|
|
ED_ADCsHL_REG = 6'b01__1010, // compair with {ir[7:6],ir[3:0]}
|
169 |
|
|
~CB_MEM & CB_RLC = 5'b00_000, // these must be compaired with ir[7:3]
|
170 |
|
|
~CB_MEM & CB_RRC = 5'b00_001, // these must be compaired with ir[7:3]
|
171 |
|
|
~CB_MEM & CB_RL = 5'b00_010, // these must be compaired with ir[7:3]
|
172 |
|
|
~CB_MEM & CB_RR = 5'b00_011, // these must be compaired with ir[7:3]
|
173 |
|
|
~CB_MEM & CB_SLA = 5'b00_100, // these must be compaired with ir[7:3]
|
174 |
|
|
~CB_MEM & CB_SRA = 5'b00_101, // these must be compaired with ir[7:3]
|
175 |
|
|
~CB_MEM & CB_SLL = 5'b00_110, // these must be compaired with ir[7:3]
|
176 |
|
|
~CB_MEM & CB_SRL = 5'b00_111, // these must be compaired with ir[7:3]
|
177 |
|
|
|
178 |
|
|
~CB_MEM & CB_BIT = 2'b01, // these must be compaired with ir[7:6]
|
179 |
|
|
~CB_MEM & CB_RES = 2'b10, // these must be compaired with ir[7:6]
|
180 |
|
|
~CB_MEM & CB_SET = 2'b11, // these must be compaired with ir[7:6]
|
181 |
|
|
ED_NEG = 5'b01___100, // compair with {ir[7:6],ir[2:0]} all A<= -A
|
182 |
|
|
ED_IMs0 = 'h46// IM 0 ; ED 46 set IM0
|
183 |
|
|
ED_LDsI_A = 'h47// LD I,A ; ED 47 move a to I
|
184 |
|
|
ED_IMs1 = 'h56// IM 1 ; ED 56 set IM1
|
185 |
|
|
ED_LDsA_I = 'h57// LD A,I ; ED 57 move I to A
|
186 |
|
|
ED_IMs2 = 'h5E// IM 2 ; ED 5E set IM2
|
187 |
|
|
|
188 |
|
|
|
189 |
|
|
|
190 |
|
|
|
191 |
|
|
|
192 |
|
|
|
193 |
|
|
|
194 |
|
|
|
195 |
|
|
// load 8 types
|
196 |
|
|
LDsA_6BC7 = 'h0A,// LD A,(BC) ; 0A
|
197 |
|
|
LDsA_6DE7 = 'h1A,// LD A,(DE) ; 1A
|
198 |
|
|
LDsB_6HL7 = 'h46,// LD B,(HL) ; 46
|
199 |
|
|
LDsD_6HL7 = 'h56,// LD D,(HL) ; 56
|
200 |
|
|
LDsH_6HL7 = 'h66,// LD H,(HL) ; 66
|
201 |
|
|
ADDsA_6HL7 = 'h86,// ADD A,(HL) ; 86
|
202 |
|
|
SUBs6HL7 = 'h96,// SUB (HL) ; 96
|
203 |
|
|
ANDs6HL7 = 'hA6,// AND (HL) ; A6
|
204 |
|
|
ORs6HL7 = 'hB6,// OR (HL) ; B6
|
205 |
|
|
LDsC_6HL7 = 'h4E,// LD C,(HL) ; 4E
|
206 |
|
|
LDsE_6HL7 = 'h5E,// LD E,(HL) ; 5E
|
207 |
|
|
LDsL_6HL7 = 'h6E,// LD L,(HL) ; 6E
|
208 |
|
|
LDsA_6HL7 = 'h7E,// LD A,(HL) ; 7E
|
209 |
|
|
ADCsA_6HL7 = 'h8E,// ADC A,(HL) ; 8E
|
210 |
|
|
SBCs6HL7 = 'h9E,// SBC (HL) ; 9E
|
211 |
|
|
XORs6HL7 = 'hAE,// XOR (HL) ; AE
|
212 |
|
|
CPs6HL7 = 'hBE,// CP (HL) ; BE
|
213 |
|
|
LDsA_6NN7 = 'h3A,// LD A,(NN) ; 3A XX XX
|
214 |
|
|
CB_MEM & CB_BIT = 2'b01, // (HL) these must be compaired with ir[7:6]
|
215 |
|
|
|
216 |
|
|
|
217 |
|
|
|
218 |
|
|
// load 16 types
|
219 |
|
|
LDsHL_6NN7 = 'h2A,// LD HL,(NN) ; 2A XX XX
|
220 |
|
|
POPsAF = 'hF1,// POP AF ; F1 AF<- (SP++ ++)
|
221 |
|
|
POPsBC = 'hC1,// POP BC ; C1 BC<- (SP++ ++)
|
222 |
|
|
POPsDE = 'hD1,// POP DE ; D1 DE<- (SP++ ++)
|
223 |
|
|
POPsHL = 'hE1,// POP HL ; E1 HL<- (SP++ ++)
|
224 |
|
|
ED_LDsREG_6NN7 = 6'b01__1011, // compair with {ir[7:6],ir[3:0]} REG = BC,DE,HL,SP
|
225 |
|
|
|
226 |
|
|
|
227 |
|
|
// store 8 types
|
228 |
|
|
LDs6HL7_N = 'h36,// LD (HL),N ; 36 XX
|
229 |
|
|
LDs6BC7_A = 'h02,// LD (BC),A ; 02
|
230 |
|
|
LDs6DE7_A = 'h12,// LD (DE),A ; 12
|
231 |
|
|
LDs6HL7_A = 'h77,// LD (HL),A ; 77
|
232 |
|
|
LDs6HL7_B = 'h70,// LD (HL),B ; 70
|
233 |
|
|
LDs6HL7_C = 'h71,// LD (HL),C ; 71
|
234 |
|
|
LDs6HL7_D = 'h72,// LD (HL),D ; 72
|
235 |
|
|
LDs6HL7_E = 'h73,// LD (HL),E ; 73
|
236 |
|
|
LDs6HL7_H = 'h74,// LD (HL),H ; 74
|
237 |
|
|
LDs6HL7_L = 'h75,// LD (HL),L ; 75
|
238 |
|
|
LDs6NN7_A = 'h32,// LD (NN),A ; 32 XX XX
|
239 |
|
|
|
240 |
|
|
// store 16 types
|
241 |
|
|
PUSHsAF = 'hF5,// PUSH AF ; F5 (-- --SP) <- AF
|
242 |
|
|
PUSHsBC = 'hC5,// PUSH BC ; C5 (-- --SP) <- BC
|
243 |
|
|
PUSHsDE = 'hD5,// PUSH DE ; D5 (-- --SP) <- DE
|
244 |
|
|
PUSHsHL = 'hE5,// PUSH HL ; E5 (-- --SP) <- HL
|
245 |
|
|
LDs6NN7_HL = 'h22,// LD (NN),HL ; 22 XX XX
|
246 |
|
|
ED_LDs6NN7_REG = 6'b01__0011,// XX XX compair with {ir[7:6],ir[3:0]} REG = BC,DE,HL,SP
|
247 |
|
|
|
248 |
|
|
// rmw 8 types
|
249 |
|
|
INCs6HL7 = 'h34,// INC (HL) ; 34
|
250 |
|
|
DECs6HL7 = 'h35,// DEC (HL) ; 35
|
251 |
|
|
|
252 |
|
|
ED_RRD = 'h67// RRD ; ED 67 nibble roates A (HL) no prefix
|
253 |
|
|
ED_RLD = 'h6F// RLD ; ED 6F nibble roates A (HL) no prefix
|
254 |
|
|
//CB_MEM = 3'h110, // this must be compaired with ir[2:0]
|
255 |
|
|
CB_MEM & CB_RLC = 5'b00_000, // these must be compaired with ir[7:3] (HL)
|
256 |
|
|
CB_MEM & CB_RRC = 5'b00_001, // these must be compaired with ir[7:3] (HL)
|
257 |
|
|
CB_MEM & CB_RL = 5'b00_010, // these must be compaired with ir[7:3] (HL)
|
258 |
|
|
CB_MEM & CB_RR = 5'b00_011, // these must be compaired with ir[7:3] (HL)
|
259 |
|
|
CB_MEM & CB_SLA = 5'b00_100, // these must be compaired with ir[7:3] (HL)
|
260 |
|
|
CB_MEM & CB_SRA = 5'b00_100, // these must be compaired with ir[7:3] (HL)
|
261 |
|
|
CB_MEM & CB_SRL = 5'b00_110, // these must be compaired with ir[7:3] (HL)
|
262 |
|
|
CB_MEM & CB_RES = 2'b10, // these must be compaired with ir[7:6] (HL)
|
263 |
|
|
CB_MEM & CB_SET = 2'b11, // these must be compaired with ir[7:6] (HL)
|
264 |
|
|
|
265 |
|
|
|
266 |
|
|
|
267 |
|
|
// rmw 16 types
|
268 |
|
|
EXs6SP7_HL = 'hE3,// EX (SP),HL ; E3
|
269 |
|
|
|
270 |
|
|
// Jumps only trick here is that next inst is not valid - ignore it
|
271 |
|
|
JRs$t2 = 'h18,// JR $+2 ; 18 XX
|
272 |
|
|
JRsC_$t2 = 'h38,// JR C,$+2 ; 38
|
273 |
|
|
JRsNC_$t2 = 'h30,// JR NC,$+2 ; 30
|
274 |
|
|
JRsNZ_$t2 = 'h20,// JR NZ,$+2 ; 20
|
275 |
|
|
JRsZ_$t2 = 'h28,// JR Z,$+2 ; 28
|
276 |
|
|
DJNZs$t2 = 'h10,// DJNZ $+2 ; 10 XX XX
|
277 |
|
|
JPs = 'hC3,// JP $+3 ; C3 XX XX
|
278 |
|
|
JPsC = 'hDA,// JP C,$+3 ; DA XX XX
|
279 |
|
|
JPsHL = 'hE9,// JP HL ; E9 // documented as indirect IS NOT
|
280 |
|
|
JPsM = 'hFA,// JP M,$+3 ; FA XX XX
|
281 |
|
|
JPsNC = 'hD2,// JP NC,$+3 ; D2 XX XX
|
282 |
|
|
JPsNZ = 'hC2,// JP NZ,$+3 ; C2 XX XX
|
283 |
|
|
JPsPE = 'hEA,// JP PE,$+3 ; EA XX XX
|
284 |
|
|
JPsPO = 'hE2,// JP PO,$+3 ; E2 XX XX
|
285 |
|
|
JPsP = 'hF2,// JP P,$+3 ; F2 XX XX
|
286 |
|
|
JPsZ = 'hCA,// JP Z,$+3 ; CA XX XX
|
287 |
|
|
RSTs0 = 'hC7,// RST 0 ; C7
|
288 |
|
|
RSTs8H = 'hCF,// RST 8H ; CF
|
289 |
|
|
RSTs10H = 'hD7,// RST 10H ; D7
|
290 |
|
|
RSTs18H = 'hDF,// RST 18H ; DF
|
291 |
|
|
RSTs20H = 'hE7,// RST 20H ; E7
|
292 |
|
|
RSTs28H = 'hEF,// RST 28H ; EF
|
293 |
|
|
RSTs30H = 'hF7,// RST 30H ; F7
|
294 |
|
|
RSTs38H = 'hFF,// RST 38H ; FF
|
295 |
|
|
|
296 |
|
|
|
297 |
|
|
// calls
|
298 |
|
|
CALLsC_NN = 'hDC,// CALL C,NN ; DC XX XX (-- --SP) <- PC, PC<-NN
|
299 |
|
|
CALLsM_NN = 'hFC,// CALL M,NN ; FC XX XX (-- --SP) <- PC, PC<-NN
|
300 |
|
|
CALLsNC_NN = 'hD4,// CALL NC,NN ; D4 XX XX (-- --SP) <- PC, PC<-NN
|
301 |
|
|
CALLsNN = 'hCD,// CALL NN ; CD XX XX (-- --SP) <- PC, PC<-NN
|
302 |
|
|
CALLsNZ_NN = 'hC4,// CALL NZ,NN ; C4 XX XX (-- --SP) <- PC, PC<-NN
|
303 |
|
|
CALLsPE_NN = 'hEC,// CALL PE,NN ; EC XX XX (-- --SP) <- PC, PC<-NN
|
304 |
|
|
CALLsPO_NN = 'hE4,// CALL PO,NN ; E4 XX XX (-- --SP) <- PC, PC<-NN
|
305 |
|
|
CALLsP_NN = 'hF4,// CALL P,NN ; F4 XX XX (-- --SP) <- PC, PC<-NN
|
306 |
|
|
CALLsZ_NN = 'hCC,// CALL Z,NN ; CC XX XX (-- --SP) <- PC, PC<-NN
|
307 |
|
|
|
308 |
|
|
//returns
|
309 |
|
|
RET = 'hC9,// RET ; C9 PC <- (SP++ ++)
|
310 |
|
|
RETsC = 'hD8,// RET C ; D8 PC <- (SP++ ++)
|
311 |
|
|
RETsM = 'hF8,// RET M ; F8 PC <- (SP++ ++)
|
312 |
|
|
RETsNC = 'hD0,// RET NC ; D0 PC <- (SP++ ++)
|
313 |
|
|
RETsNZ = 'hC0,// RET NZ ; C0 PC <- (SP++ ++)
|
314 |
|
|
RETsP = 'hF0,// RET P ; F0 PC <- (SP++ ++)
|
315 |
|
|
RETsPE = 'hE8,// RET PE ; E8 PC <- (SP++ ++)
|
316 |
|
|
RETsPO = 'hE0,// RET PO ; E0 PC <- (SP++ ++)
|
317 |
|
|
RETsZ = 'hC8,// RET Z ; C8 PC <- (SP++ ++)
|
318 |
|
|
ED_RETN = 5'b01___101; // compair with {ir[7:6],ir[2:0]} and !reti
|
319 |
|
|
|
320 |
|
|
|
321 |
|
|
//io input
|
322 |
|
|
INsA_6N7 = 'hDB,// IN A,(N) ; DB XX A<-(Nio)//silly
|
323 |
|
|
ED_INsREG_6C7 = 5'b01___000,// compair with {ir[7:6],ir[2:0]} really (BCio)
|
324 |
|
|
|
325 |
|
|
//io output
|
326 |
|
|
OUTs6N7_A = 'hD3,// OUT (N),A ; D3 XX A-> (Nio)
|
327 |
|
|
ED_OUTs6C7_REG = 5'b01___001,// compair with {ir[7:6],ir[2:0]}
|
328 |
|
|
|
329 |
|
|
// ED Block Move messyness
|
330 |
|
|
//
|
331 |
|
|
ED_LDI = 'hA0// LDI ; ED A0 (DE++) <= (HL++) , BC--
|
332 |
|
|
ED_LDD = 'hA8// LDD ; ED A8 (DE--) <= (HL--) , BC--
|
333 |
|
|
ED_LDIR = 'hB0// LDIR ; ED B0 (DE++) <= (HL++) , BC-- Repeat til BC==0
|
334 |
|
|
ED_LDDR = 'hB8// LDDR ; ED B8 (DE--) <= (HL--) , BC-- Repeat til BC==0
|
335 |
|
|
|
336 |
|
|
|
337 |
|
|
ED_CPI = 'hA1// CPI ; ED A1 A - (HL++) , BC--
|
338 |
|
|
ED_CPD = 'hA9// CPD ; ED A9 A - (HL--) , BC--
|
339 |
|
|
ED_CPIR = 'hB1// CPIR ; ED B1 A - (HL++) , BC-- repeat if(|B
|
340 |
|
|
ED_CPDR = 'hB9// CPDR ; ED B9 A - (HL--) , BC-- repeat if(|B
|
341 |
|
|
|
342 |
|
|
|
343 |
|
|
ED_INI = 'hA2// INI ; ED A2 (HL++) <- (Cio) , B--
|
344 |
|
|
ED_IND = 'hAA// IND ; ED AA (HL--) <- (Cio) , B--
|
345 |
|
|
ED_INIR = 'hB2// INIR ; ED B2 (HL++) <- (Cio) , B-- repeat if(|B)
|
346 |
|
|
ED_INDR = 'hBA// INDR ; ED BA (HL--) <- (Cio) , B-- repeat if(|B)
|
347 |
|
|
|
348 |
|
|
|
349 |
|
|
|
350 |
|
|
ED_OUTI = 'hA3// OUTI ; ED A3 (Cio) <-(HL++) , B--
|
351 |
|
|
ED_OUTD = 'hAB// OUTD ; ED AB (Cio) <-(HL--) , B--
|
352 |
|
|
ED_OTIR = 'hB3// OTIR ; ED B3 (Cio) <-(HL++) , B-- rpt if(|B)
|
353 |
|
|
ED_OTDR = 'hBB// OTDR ; ED BB (Cio) <-(HL--) , B-- rpt if(|B)
|
354 |
|
|
|
355 |
|
|
|
356 |
|
|
|
357 |
|
|
|
358 |
|
|
|
359 |
|
|
CBgrp = 'hCB,// CBgrp is rotates and bit munging below
|
360 |
|
|
EDgrp = 'hED,// EDgrp ED
|
361 |
|
|
FDgrp = 'hFD,// FDgrp FD
|
362 |
|
|
DDgrp = 'hDD,// DDgrp
|