5#include <unordered_map>
10 {0x02,
"SET1 direct.0"},
11 {0x03,
"BBS direct.0,rel"},
12 {0x04,
"OR A,direct"},
15 {0x07,
"OR A,(direct+X)"},
17 {0x09,
"OR direct,imm"},
18 {0x0A,
"OR1 C,membit"},
26 {0x12,
"CLR1 direct.0"},
27 {0x13,
"BBC direct.0,rel"},
28 {0x14,
"OR A,direct+X"},
31 {0x17,
"OR A,(direct)+Y"},
32 {0x18,
"OR direct,direct"},
34 {0x1A,
"DECW direct"},
35 {0x1B,
"ASL direct+X"},
39 {0x1F,
"JMP (abs+X)"},
42 {0x22,
"SET1 direct.1"},
43 {0x23,
"BBS direct.1,rel"},
44 {0x24,
"AND A,direct"},
47 {0x27,
"AND A,(direct+X)"},
49 {0x29,
"AND direct,imm"},
50 {0x2A,
"OR1 C,/membit"},
54 {0x2E,
"CBNE direct,rel"},
58 {0x32,
"CLR1 direct.1"},
59 {0x33,
"BBC direct.1,rel"},
60 {0x34,
"AND A,direct+X"},
61 {0x35,
"AND A,abs+X"},
62 {0x36,
"AND A,abs+Y"},
63 {0x37,
"AND A,(direct)+Y"},
64 {0x38,
"AND direct,direct"},
65 {0x39,
"AND (X),(Y)"},
66 {0x3A,
"INCW direct"},
67 {0x3B,
"ROL direct+X"},
70 {0x3E,
"CMP X,direct"},
74 {0x42,
"SET1 direct.2"},
75 {0x43,
"BBS direct.2,rel"},
76 {0x44,
"EOR A,direct"},
79 {0x47,
"EOR A,(direct+X)"},
81 {0x49,
"EOR direct,imm"},
82 {0x4A,
"AND1 C,membit"},
90 {0x52,
"CLR1 direct.2"},
91 {0x53,
"BBC direct.2,rel"},
92 {0x54,
"EOR A,direct+X"},
93 {0x55,
"EOR A,abs+X"},
94 {0x56,
"EOR A,abs+Y"},
95 {0x57,
"EOR A,(direct)+Y"},
96 {0x58,
"EOR direct,direct"},
97 {0x59,
"EOR (X),(Y)"},
98 {0x5A,
"CMPW YA,direct"},
99 {0x5B,
"LSR direct+X"},
106 {0x62,
"SET1 direct.3"},
107 {0x63,
"BBS direct.3,rel"},
108 {0x64,
"CMP A,direct"},
111 {0x67,
"CMP A,(direct+X)"},
112 {0x68,
"CMP A,#imm"},
113 {0x69,
"CMP direct,imm"},
114 {0x6A,
"AND1 C,/membit"},
115 {0x6B,
"ROR direct"},
118 {0x6E,
"DBNZ direct,rel"},
122 {0x72,
"CLR1 direct.3"},
123 {0x73,
"BBC direct.3,rel"},
124 {0x74,
"CMP A,direct+X"},
125 {0x75,
"CMP A,abs+X"},
126 {0x76,
"CMP A,abs+Y"},
127 {0x77,
"CMP A,(direct)+Y"},
128 {0x78,
"CMP direct,direct"},
129 {0x79,
"CMP (X),(Y)"},
130 {0x7A,
"ADDW YA,direct"},
131 {0x7B,
"ROR direct+X"},
134 {0x7E,
"CMP Y,direct"},
138 {0x82,
"SET1 direct.4"},
139 {0x83,
"BBS direct.4,rel"},
140 {0x84,
"ADC A,direct"},
143 {0x87,
"ADC A,(direct+X)"},
144 {0x88,
"ADC A,#imm"},
145 {0x89,
"ADC direct,imm"},
146 {0x8A,
"EOR1 C,membit"},
147 {0x8B,
"DEC direct"},
149 {0x8D,
"MOV Y,#imm"},
151 {0x8F,
"MOV direct,#imm"},
154 {0x92,
"CLR1 direct.4"},
155 {0x93,
"BBC direct.4,rel"},
156 {0x94,
"ADC A,direct+X"},
157 {0x95,
"ADC A,abs+X"},
158 {0x96,
"ADC A,abs+Y"},
159 {0x97,
"ADC A,(direct)+Y"},
160 {0x98,
"ADC direct,direct"},
161 {0x99,
"ADC (X),(Y)"},
162 {0x9A,
"SUBW YA,direct"},
163 {0x9B,
"DEC direct+X"},
170 {0xA2,
"SET1 direct.5"},
171 {0xA3,
"BBS direct.5,rel"},
172 {0xA4,
"SBC A,direct"},
175 {0xA7,
"SBC A,(direct+X)"},
176 {0xA8,
"SBC A,#imm"},
177 {0xA9,
"SBC direct,imm"},
178 {0xAA,
"MOV1 C,membit"},
179 {0xAB,
"INC direct"},
181 {0xAD,
"CMP Y,#imm"},
183 {0xAF,
"MOV (X)+,A"},
186 {0xB2,
"CLR1 direct.5"},
187 {0xB3,
"BBC direct.5,rel"},
188 {0xB4,
"SBC A,direct+X"},
189 {0xB5,
"SBC A,abs+X"},
190 {0xB6,
"SBC A,abs+Y"},
191 {0xB7,
"SBC A,(direct)+Y"},
192 {0xB8,
"SBC direct,direct"},
193 {0xB9,
"SBC (X),(Y)"},
194 {0xBA,
"MOVW YA,direct"},
195 {0xBB,
"INC direct+X"},
199 {0xBF,
"MOV A,(X)+"},
202 {0xC2,
"SET1 direct.6"},
203 {0xC3,
"BBS direct.6,rel"},
204 {0xC4,
"MOV direct,A"},
207 {0xC7,
"MOV (direct+X),A"},
208 {0xC8,
"CMP X,#imm"},
210 {0xCA,
"MOV1 membit,C"},
211 {0xCB,
"MOV direct,Y"},
213 {0xCD,
"MOV X,#imm"},
218 {0xD2,
"CLR1 direct.6"},
219 {0xD3,
"BBC direct.6,rel"},
220 {0xD4,
"MOV direct+X,A"},
221 {0xD5,
"MOV abs+X,A"},
222 {0xD6,
"MOV abs+Y,A"},
223 {0xD7,
"MOV (direct)+Y,A"},
224 {0xD8,
"MOV direct,X"},
225 {0xD9,
"MOV direct+Y,X"},
226 {0xDA,
"MOVW direct,YA"},
227 {0xDB,
"MOV direct+X,Y"},
230 {0xDE,
"CBNE direct+X,rel"},
234 {0xE2,
"SET1 direct.7"},
235 {0xE3,
"BBS direct.7,rel"},
236 {0xE4,
"MOV A,direct"},
239 {0xE7,
"MOV A,(direct+X)"},
240 {0xE8,
"MOV A,#imm"},
242 {0xEA,
"NOT1 membit"},
243 {0xEB,
"MOV Y,direct"},
250 {0xF2,
"CLR1 direct.7"},
251 {0xF3,
"BBC direct.7,rel"},
252 {0xF4,
"MOV A,direct+X"},
253 {0xF5,
"MOV A,abs+X"},
254 {0xF6,
"MOV A,abs+Y"},
255 {0xF7,
"MOV A,(direct)+Y"},
256 {0xF8,
"MOV X,direct"},
257 {0xF9,
"MOV X,direct+Y"},
258 {0xFA,
"MOV direct,S"},
259 {0xFB,
"MOV Y,direct+X"},
262 {0xFE,
"DBNZ Y,rel"},
const std::unordered_map< uint8_t, std::string > spc_opcode_map