2010-02-03 Quentin Neill <quentin.neill@amd.com>
[binutils.git] / opcodes / w65-opc.h
blobddef8a6e44265129754c5d10a0af4b052d4e43a2
1 /* Instruction opcode header for WDC 65816
2 (generated by the program sim/w65/gencode -a)
4 Copyright 2001, 2002, 2005, 2007 Free Software Foundation, Inc.
6 This file is part of the GNU opcodes library.
8 This library is free software; you can redistribute it and/or modify
9 it under the terms of the GNU General Public License as published by
10 the Free Software Foundation; either version 3, or (at your option)
11 any later version.
13 It is distributed in the hope that it will be useful, but WITHOUT
14 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
15 or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public
16 License for more details.
18 You should have received a copy of the GNU General Public License
19 along with this file; see the file COPYING. If not, write to the
20 Free Software Foundation, 51 Franklin Street - Fifth Floor, Boston,
21 MA 02110-1301, USA. */
23 #define ADDR_IMMTOA 1 /* #a */
24 #define ADDR_IMMCOP 2 /* #c */
25 #define ADDR_IMMTOI 3 /* #i */
26 #define ADDR_ACC 4 /* A */
27 #define ADDR_PC_REL 5 /* r */
28 #define ADDR_PC_REL_LONG 6 /* rl */
29 #define ADDR_IMPLIED 7 /* i */
30 #define ADDR_STACK 8 /* s */
31 #define ADDR_DIR 9 /* d */
32 #define ADDR_DIR_IDX_X 10 /* d,x */
33 #define ADDR_DIR_IDX_Y 11 /* d,y */
34 #define ADDR_DIR_IND 12 /* (d) */
35 #define ADDR_DIR_IDX_IND_X 13 /* (d,x) */
36 #define ADDR_DIR_IND_IDX_Y 14 /* (d),y */
37 #define ADDR_DIR_IND_LONG 15 /* [d] */
38 #define ADDR_DIR_IND_IDX_Y_LONG 16 /* [d],y */
39 #define ADDR_ABS 17 /* a */
40 #define ADDR_ABS_IDX_X 18 /* a,x */
41 #define ADDR_ABS_IDX_Y 19 /* a,y */
42 #define ADDR_ABS_LONG 20 /* al */
43 #define ADDR_ABS_IND_LONG 21 /* [a] */
44 #define ADDR_ABS_LONG_IDX_X 22 /* al,x */
45 #define ADDR_STACK_REL 23 /* d,s */
46 #define ADDR_STACK_REL_INDX_IDX 24 /* (d,s),y */
47 #define ADDR_ABS_IND 25 /* (a) */
48 #define ADDR_ABS_IND_IDX 26 /* (a,x) */
49 #define ADDR_BLOCK_MOVE 27 /* xyz */
50 struct opinfo {
51 int val;
52 int code;
53 char *name;
54 int amode;
56 const struct opinfo optable[257]={
57 #define O_adc 1
58 #define O_and 2
59 #define O_asl 3
60 #define O_bcc 4
61 #define O_bcs 5
62 #define O_beq 6
63 #define O_bit 7
64 #define O_bmi 8
65 #define O_bne 9
66 #define O_bpl 10
67 #define O_bra 11
68 #define O_brk 12
69 #define O_brl 13
70 #define O_bvc 14
71 #define O_bvs 15
72 #define O_clc 16
73 #define O_cld 17
74 #define O_cli 18
75 #define O_clv 19
76 #define O_cmp 20
77 #define O_cop 21
78 #define O_cpx 22
79 #define O_cpy 23
80 #define O_dec 24
81 #define O_dex 25
82 #define O_dey 26
83 #define O_eor 27
84 #define O_inc 28
85 #define O_inx 29
86 #define O_iny 30
87 #define O_jmp 31
88 #define O_jsr 32
89 #define O_lda 33
90 #define O_ldx 34
91 #define O_ldy 35
92 #define O_lsr 36
93 #define O_mvn 37
94 #define O_mvp 38
95 #define O_nop 39
96 #define O_ora 40
97 #define O_pea 41
98 #define O_pei 42
99 #define O_per 43
100 #define O_pha 44
101 #define O_phb 45
102 #define O_phd 46
103 #define O_phk 47
104 #define O_php 48
105 #define O_phx 49
106 #define O_phy 50
107 #define O_pla 51
108 #define O_plb 52
109 #define O_pld 53
110 #define O_plp 54
111 #define O_plx 55
112 #define O_ply 56
113 #define O_rep 57
114 #define O_rol 58
115 #define O_ror 59
116 #define O_rti 60
117 #define O_rtl 61
118 #define O_rts 62
119 #define O_sbc 63
120 #define O_sec 64
121 #define O_sed 65
122 #define O_sei 66
123 #define O_sep 67
124 #define O_sta 68
125 #define O_stp 69
126 #define O_stx 70
127 #define O_sty 71
128 #define O_stz 72
129 #define O_tax 73
130 #define O_tay 74
131 #define O_tcd 75
132 #define O_tcs 76
133 #define O_tdc 77
134 #define O_trb 78
135 #define O_tsb 79
136 #define O_tsc 80
137 #define O_tsx 81
138 #define O_txa 82
139 #define O_txs 83
140 #define O_txy 84
141 #define O_tya 85
142 #define O_tyx 86
143 #define O_wai 87
144 #define O_wdm 88
145 #define O_xba 89
146 #define O_xce 90
147 #ifdef DEFINE_TABLE
148 {0x69, O_adc, "adc", ADDR_IMMTOA},
149 {0x72, O_adc, "adc", ADDR_DIR_IND},
150 {0x71, O_adc, "adc", ADDR_DIR_IND_IDX_Y},
151 {0x73, O_adc, "adc", ADDR_STACK_REL_INDX_IDX},
152 {0x61, O_adc, "adc", ADDR_DIR_IDX_IND_X},
153 {0x67, O_adc, "adc", ADDR_DIR_IND_LONG},
154 {0x77, O_adc, "adc", ADDR_DIR_IND_IDX_Y_LONG},
155 {0x6D, O_adc, "adc", ADDR_ABS},
156 {0x7D, O_adc, "adc", ADDR_ABS_IDX_X},
157 {0x79, O_adc, "adc", ADDR_ABS_IDX_Y},
158 {0x6F, O_adc, "adc", ADDR_ABS_LONG},
159 {0x7F, O_adc, "adc", ADDR_ABS_LONG_IDX_X},
160 {0x65, O_adc, "adc", ADDR_DIR},
161 {0x63, O_adc, "adc", ADDR_STACK_REL},
162 {0x75, O_adc, "adc", ADDR_DIR_IDX_X},
163 {0x29, O_and, "and", ADDR_IMMTOA},
164 {0x32, O_and, "and", ADDR_DIR_IND},
165 {0x31, O_and, "and", ADDR_DIR_IND_IDX_Y},
166 {0x33, O_and, "and", ADDR_STACK_REL_INDX_IDX},
167 {0x21, O_and, "and", ADDR_DIR_IDX_IND_X},
168 {0x27, O_and, "and", ADDR_DIR_IND_LONG},
169 {0x37, O_and, "and", ADDR_DIR_IND_IDX_Y_LONG},
170 {0x2D, O_and, "and", ADDR_ABS},
171 {0x3D, O_and, "and", ADDR_ABS_IDX_X},
172 {0x39, O_and, "and", ADDR_ABS_IDX_Y},
173 {0x2F, O_and, "and", ADDR_ABS_LONG},
174 {0x3F, O_and, "and", ADDR_ABS_LONG_IDX_X},
175 {0x25, O_and, "and", ADDR_DIR},
176 {0x23, O_and, "and", ADDR_STACK_REL},
177 {0x35, O_and, "and", ADDR_DIR_IDX_X},
178 {0x0A, O_asl, "asl", ADDR_ACC},
179 {0x0E, O_asl, "asl", ADDR_ABS},
180 {0x1E, O_asl, "asl", ADDR_ABS_IDX_X},
181 {0x06, O_asl, "asl", ADDR_DIR},
182 {0x16, O_asl, "asl", ADDR_DIR_IDX_X},
183 {0x90, O_bcc, "bcc", ADDR_PC_REL},
184 {0xB0, O_bcs, "bcs", ADDR_PC_REL},
185 {0xF0, O_beq, "beq", ADDR_PC_REL},
186 {0x89, O_bit, "bit", ADDR_IMMTOA},
187 {0x24, O_bit, "bit", ADDR_DIR_IND},
188 {0x34, O_bit, "bit", ADDR_DIR_IDX_IND_X},
189 {0x2C, O_bit, "bit", ADDR_ABS},
190 {0x3C, O_bit, "bit", ADDR_ABS_IDX_X},
191 {0x30, O_bmi, "bmi", ADDR_PC_REL},
192 {0xD0, O_bne, "bne", ADDR_PC_REL},
193 {0x10, O_bpl, "bpl", ADDR_PC_REL},
194 {0x80, O_bra, "bra", ADDR_PC_REL},
195 {0x00, O_brk, "brk", ADDR_STACK},
196 {0x82, O_brl, "brl", ADDR_PC_REL_LONG},
197 {0x50, O_bvc, "bvc", ADDR_PC_REL},
198 {0x70, O_bvs, "bvs", ADDR_PC_REL},
199 {0x18, O_clc, "clc", ADDR_IMPLIED},
200 {0xD8, O_cld, "cld", ADDR_IMPLIED},
201 {0x58, O_cli, "cli", ADDR_IMPLIED},
202 {0xB8, O_clv, "clv", ADDR_IMPLIED},
203 {0xC9, O_cmp, "cmp", ADDR_IMMTOA},
204 {0xD2, O_cmp, "cmp", ADDR_DIR_IND},
205 {0xD1, O_cmp, "cmp", ADDR_DIR_IND_IDX_Y},
206 {0xD3, O_cmp, "cmp", ADDR_STACK_REL_INDX_IDX},
207 {0xC1, O_cmp, "cmp", ADDR_DIR_IDX_IND_X},
208 {0xC7, O_cmp, "cmp", ADDR_DIR_IND_LONG},
209 {0xD7, O_cmp, "cmp", ADDR_DIR_IND_IDX_Y_LONG},
210 {0xCD, O_cmp, "cmp", ADDR_ABS},
211 {0xDD, O_cmp, "cmp", ADDR_ABS_IDX_X},
212 {0xD9, O_cmp, "cmp", ADDR_ABS_IDX_Y},
213 {0xCF, O_cmp, "cmp", ADDR_ABS_LONG},
214 {0xDF, O_cmp, "cmp", ADDR_ABS_LONG_IDX_X},
215 {0xC5, O_cmp, "cmp", ADDR_DIR},
216 {0xC3, O_cmp, "cmp", ADDR_STACK_REL},
217 {0xD5, O_cmp, "cmp", ADDR_DIR_IDX_X},
218 {0x02, O_cop, "cop", ADDR_IMMCOP},
219 {0xE0, O_cpx, "cpx", ADDR_IMMTOI},
220 {0xEC, O_cpx, "cpx", ADDR_ABS},
221 {0xE4, O_cpx, "cpx", ADDR_DIR},
222 {0xC0, O_cpy, "cpy", ADDR_IMMTOI},
223 {0xCC, O_cpy, "cpy", ADDR_ABS},
224 {0xC4, O_cpy, "cpy", ADDR_DIR},
225 {0x3A, O_dec, "dec", ADDR_ACC},
226 {0xCE, O_dec, "dec", ADDR_ABS},
227 {0xDE, O_dec, "dec", ADDR_ABS_IDX_X},
228 {0xC6, O_dec, "dec", ADDR_DIR},
229 {0xD6, O_dec, "dec", ADDR_DIR_IDX_X},
230 {0xCA, O_dex, "dex", ADDR_IMPLIED},
231 {0x88, O_dey, "dey", ADDR_IMPLIED},
232 {0x49, O_eor, "eor", ADDR_IMMTOA},
233 {0x52, O_eor, "eor", ADDR_DIR_IND},
234 {0x51, O_eor, "eor", ADDR_DIR_IND_IDX_Y},
235 {0x53, O_eor, "eor", ADDR_STACK_REL_INDX_IDX},
236 {0x41, O_eor, "eor", ADDR_DIR_IDX_IND_X},
237 {0x47, O_eor, "eor", ADDR_DIR_IND_LONG},
238 {0x57, O_eor, "eor", ADDR_DIR_IND_IDX_Y_LONG},
239 {0x4D, O_eor, "eor", ADDR_ABS},
240 {0x5D, O_eor, "eor", ADDR_ABS_IDX_X},
241 {0x59, O_eor, "eor", ADDR_ABS_IDX_Y},
242 {0x4F, O_eor, "eor", ADDR_ABS_LONG},
243 {0x5F, O_eor, "eor", ADDR_ABS_LONG_IDX_X},
244 {0x45, O_eor, "eor", ADDR_DIR},
245 {0x43, O_eor, "eor", ADDR_STACK_REL},
246 {0x55, O_eor, "eor", ADDR_DIR_IDX_X},
247 {0x1A, O_inc, "inc", ADDR_ACC},
248 {0xEE, O_inc, "inc", ADDR_ABS},
249 {0xFE, O_inc, "inc", ADDR_ABS_IDX_X},
250 {0xE6, O_inc, "inc", ADDR_DIR},
251 {0xF6, O_inc, "inc", ADDR_DIR_IDX_X},
252 {0xE8, O_inx, "inx", ADDR_IMPLIED},
253 {0xC8, O_iny, "iny", ADDR_IMPLIED},
254 {0x6C, O_jmp, "jmp", ADDR_ABS_IND},
255 {0x7C, O_jmp, "jmp", ADDR_ABS_IND_IDX},
256 {0xDC, O_jmp, "jmp", ADDR_ABS_IND_LONG},
257 {0x4C, O_jmp, "jmp", ADDR_ABS},
258 {0x5C, O_jmp, "jmp", ADDR_ABS_LONG},
259 {0xFC, O_jsr, "jsr", ADDR_ABS_IND_IDX},
260 {0x20, O_jsr, "jsr", ADDR_ABS},
261 {0x22, O_jsr, "jsr", ADDR_ABS_LONG},
262 {0xA9, O_lda, "lda", ADDR_IMMTOA},
263 {0xB2, O_lda, "lda", ADDR_DIR_IND},
264 {0xB1, O_lda, "lda", ADDR_DIR_IND_IDX_Y},
265 {0xB3, O_lda, "lda", ADDR_STACK_REL_INDX_IDX},
266 {0xA1, O_lda, "lda", ADDR_DIR_IDX_IND_X},
267 {0xA7, O_lda, "lda", ADDR_DIR_IND_LONG},
268 {0xB7, O_lda, "lda", ADDR_DIR_IND_IDX_Y_LONG},
269 {0xAD, O_lda, "lda", ADDR_ABS},
270 {0xBD, O_lda, "lda", ADDR_ABS_IDX_X},
271 {0xB9, O_lda, "lda", ADDR_ABS_IDX_Y},
272 {0xAF, O_lda, "lda", ADDR_ABS_LONG},
273 {0xBF, O_lda, "lda", ADDR_ABS_LONG_IDX_X},
274 {0xA5, O_lda, "lda", ADDR_DIR},
275 {0xA3, O_lda, "lda", ADDR_STACK_REL},
276 {0xB5, O_lda, "lda", ADDR_DIR_IDX_X},
277 {0xA2, O_ldx, "ldx", ADDR_IMMTOI},
278 {0xAE, O_ldx, "ldx", ADDR_ABS},
279 {0xBE, O_ldx, "ldx", ADDR_ABS_IDX_Y},
280 {0xA6, O_ldx, "ldx", ADDR_DIR},
281 {0xB6, O_ldx, "ldx", ADDR_DIR_IDX_Y},
282 {0xA0, O_ldy, "ldy", ADDR_IMMTOI},
283 {0xAC, O_ldy, "ldy", ADDR_ABS},
284 {0xBC, O_ldy, "ldy", ADDR_ABS_IDX_X},
285 {0xA4, O_ldy, "ldy", ADDR_DIR},
286 {0xB4, O_ldy, "ldy", ADDR_DIR_IDX_X},
287 {0x4A, O_lsr, "lsr", ADDR_ACC},
288 {0x4E, O_lsr, "lsr", ADDR_ABS},
289 {0x5E, O_lsr, "lsr", ADDR_ABS_IDX_X},
290 {0x46, O_lsr, "lsr", ADDR_DIR},
291 {0x56, O_lsr, "lsr", ADDR_DIR_IDX_X},
292 {0x54, O_mvn, "mvn", ADDR_BLOCK_MOVE},
293 {0x44, O_mvp, "mvp", ADDR_BLOCK_MOVE},
294 {0xEA, O_nop, "nop", ADDR_IMPLIED},
295 {0x09, O_ora, "ora", ADDR_IMMTOA},
296 {0x12, O_ora, "ora", ADDR_DIR_IND},
297 {0x11, O_ora, "ora", ADDR_DIR_IND_IDX_Y},
298 {0x13, O_ora, "ora", ADDR_STACK_REL_INDX_IDX},
299 {0x01, O_ora, "ora", ADDR_DIR_IDX_IND_X},
300 {0x07, O_ora, "ora", ADDR_DIR_IND_LONG},
301 {0x17, O_ora, "ora", ADDR_DIR_IND_IDX_Y_LONG},
302 {0x0D, O_ora, "ora", ADDR_ABS},
303 {0x1D, O_ora, "ora", ADDR_ABS_IDX_X},
304 {0x19, O_ora, "ora", ADDR_ABS_IDX_Y},
305 {0x0F, O_ora, "ora", ADDR_ABS_LONG},
306 {0x1F, O_ora, "ora", ADDR_ABS_LONG_IDX_X},
307 {0x05, O_ora, "ora", ADDR_DIR},
308 {0x03, O_ora, "ora", ADDR_STACK_REL},
309 {0x15, O_ora, "ora", ADDR_DIR_IDX_X},
310 {0xF4, O_pea, "pea", ADDR_ABS},
311 {0xD4, O_pei, "pei", ADDR_DIR},
312 {0x62, O_per, "per", ADDR_PC_REL_LONG},
313 {0x48, O_pha, "pha", ADDR_STACK},
314 {0x8B, O_phb, "phb", ADDR_STACK},
315 {0x0B, O_phd, "phd", ADDR_STACK},
316 {0x4B, O_phk, "phk", ADDR_STACK},
317 {0x08, O_php, "php", ADDR_STACK},
318 {0xDA, O_phx, "phx", ADDR_STACK},
319 {0x5A, O_phy, "phy", ADDR_STACK},
320 {0x68, O_pla, "pla", ADDR_STACK},
321 {0xAB, O_plb, "plb", ADDR_STACK},
322 {0x2B, O_pld, "pld", ADDR_STACK},
323 {0x28, O_plp, "plp", ADDR_STACK},
324 {0xFA, O_plx, "plx", ADDR_STACK},
325 {0x7A, O_ply, "ply", ADDR_STACK},
326 {0xC2, O_rep, "rep", ADDR_IMMCOP},
327 {0x2A, O_rol, "rol", ADDR_ACC},
328 {0x2E, O_rol, "rol", ADDR_ABS},
329 {0x3E, O_rol, "rol", ADDR_ABS_IDX_X},
330 {0x26, O_rol, "rol", ADDR_DIR},
331 {0x36, O_rol, "rol", ADDR_DIR_IDX_X},
332 {0x6A, O_ror, "ror", ADDR_ACC},
333 {0x6E, O_ror, "ror", ADDR_ABS},
334 {0x7E, O_ror, "ror", ADDR_ABS_IDX_X},
335 {0x66, O_ror, "ror", ADDR_DIR},
336 {0x76, O_ror, "ror", ADDR_DIR_IDX_X},
337 {0x40, O_rti, "rti", ADDR_STACK},
338 {0x6B, O_rtl, "rtl", ADDR_STACK},
339 {0x60, O_rts, "rts", ADDR_STACK},
340 {0xE9, O_sbc, "sbc", ADDR_IMMTOA},
341 {0xF2, O_sbc, "sbc", ADDR_DIR_IND},
342 {0xF1, O_sbc, "sbc", ADDR_DIR_IND_IDX_Y},
343 {0xF3, O_sbc, "sbc", ADDR_STACK_REL_INDX_IDX},
344 {0xE1, O_sbc, "sbc", ADDR_DIR_IDX_IND_X},
345 {0xE7, O_sbc, "sbc", ADDR_DIR_IND_LONG},
346 {0xF7, O_sbc, "sbc", ADDR_DIR_IND_IDX_Y_LONG},
347 {0xED, O_sbc, "sbc", ADDR_ABS},
348 {0xFD, O_sbc, "sbc", ADDR_ABS_IDX_X},
349 {0xF9, O_sbc, "sbc", ADDR_ABS_IDX_Y},
350 {0xEF, O_sbc, "sbc", ADDR_ABS_LONG},
351 {0xFF, O_sbc, "sbc", ADDR_ABS_LONG_IDX_X},
352 {0xE5, O_sbc, "sbc", ADDR_DIR},
353 {0xE3, O_sbc, "sbc", ADDR_STACK_REL},
354 {0xF5, O_sbc, "sbc", ADDR_DIR_IDX_X},
355 {0x38, O_sec, "sec", ADDR_IMPLIED},
356 {0xF8, O_sed, "sed", ADDR_IMPLIED},
357 {0x78, O_sei, "sei", ADDR_IMPLIED},
358 {0xE2, O_sep, "sep", ADDR_IMMCOP},
359 {0x92, O_sta, "sta", ADDR_DIR_IND},
360 {0x91, O_sta, "sta", ADDR_DIR_IND_IDX_Y},
361 {0x93, O_sta, "sta", ADDR_STACK_REL_INDX_IDX},
362 {0x81, O_sta, "sta", ADDR_DIR_IDX_IND_X},
363 {0x87, O_sta, "sta", ADDR_DIR_IND_LONG},
364 {0x97, O_sta, "sta", ADDR_DIR_IND_IDX_Y_LONG},
365 {0x8D, O_sta, "sta", ADDR_ABS},
366 {0x9D, O_sta, "sta", ADDR_ABS_IDX_X},
367 {0x99, O_sta, "sta", ADDR_ABS_IDX_Y},
368 {0x8F, O_sta, "sta", ADDR_ABS_LONG},
369 {0x9F, O_sta, "sta", ADDR_ABS_LONG_IDX_X},
370 {0x85, O_sta, "sta", ADDR_DIR},
371 {0x83, O_sta, "sta", ADDR_STACK_REL},
372 {0x95, O_sta, "sta", ADDR_DIR_IDX_X},
373 {0xDB, O_stp, "stp", ADDR_IMPLIED},
374 {0x8E, O_stx, "stx", ADDR_ABS},
375 {0x86, O_stx, "stx", ADDR_DIR},
376 {0x96, O_stx, "stx", ADDR_DIR_IDX_X},
377 {0x8C, O_sty, "sty", ADDR_ABS},
378 {0x84, O_sty, "sty", ADDR_DIR},
379 {0x94, O_sty, "sty", ADDR_DIR_IDX_X},
380 {0x9C, O_stz, "stz", ADDR_ABS},
381 {0x9E, O_stz, "stz", ADDR_ABS_IDX_X},
382 {0x64, O_stz, "stz", ADDR_DIR},
383 {0x74, O_stz, "stz", ADDR_DIR_IDX_X},
384 {0xAA, O_tax, "tax", ADDR_IMPLIED},
385 {0xA8, O_tay, "tay", ADDR_IMPLIED},
386 {0x5B, O_tcd, "tcd", ADDR_IMPLIED},
387 {0x1B, O_tcs, "tcs", ADDR_IMPLIED},
388 {0x7B, O_tdc, "tdc", ADDR_IMPLIED},
389 {0x1C, O_trb, "trb", ADDR_ABS},
390 {0x14, O_trb, "trb", ADDR_DIR},
391 {0x0C, O_tsb, "tsb", ADDR_ABS},
392 {0x04, O_tsb, "tsb", ADDR_DIR},
393 {0x3B, O_tsc, "tsc", ADDR_IMPLIED},
394 {0xBA, O_tsx, "tsx", ADDR_IMPLIED},
395 {0x8A, O_txa, "txa", ADDR_IMPLIED},
396 {0x9A, O_txs, "txs", ADDR_IMPLIED},
397 {0x9B, O_txy, "txy", ADDR_IMPLIED},
398 {0x98, O_tya, "tya", ADDR_IMPLIED},
399 {0xBB, O_tyx, "tyx", ADDR_IMPLIED},
400 {0xCB, O_wai, "wai", ADDR_IMPLIED},
401 {0x42, O_wdm, "wdm", ADDR_IMPLIED},
402 {0xEB, O_xba, "xba", ADDR_IMPLIED},
403 {0xFB, O_xce, "xce", ADDR_IMPLIED},
404 { 0, 0, NULL, 0 }
406 #endif
407 #define DISASM()\
408 case ADDR_IMMTOA:\
409 args[0] = M==0 ? asR_W65_ABS16 : asR_W65_ABS8;\
410 print_operand (0, " #$0", args);\
411 size += M==0 ? 2:1;\
412 break;\
413 case ADDR_IMMCOP:\
414 args[0] = asR_W65_ABS8;\
415 print_operand (0, " #$0", args);\
416 size += 1;\
417 break;\
418 case ADDR_IMMTOI:\
419 args[0] = X==0 ? asR_W65_ABS16 : asR_W65_ABS8;\
420 print_operand (0, " #$0", args);\
421 size += X==0 ? 2:1;\
422 break;\
423 case ADDR_ACC:\
424 print_operand (0, " a", 0);\
425 size += 0;\
426 break;\
427 case ADDR_PC_REL:\
428 args[0] = asR_W65_PCR8;\
429 print_operand (0, " $0", args);\
430 size += 1;\
431 break;\
432 case ADDR_PC_REL_LONG:\
433 args[0] = asR_W65_PCR16;\
434 print_operand (0, " $0", args);\
435 size += 2;\
436 break;\
437 case ADDR_IMPLIED:\
438 size += 0;\
439 break;\
440 case ADDR_STACK:\
441 size += 0;\
442 break;\
443 case ADDR_DIR:\
444 args[0] = asR_W65_ABS8;\
445 print_operand (1, " <$0", args);\
446 size += 1;\
447 break;\
448 case ADDR_DIR_IDX_X:\
449 args[0] = asR_W65_ABS8;\
450 print_operand (1, " <$0,x", args);\
451 size += 1;\
452 break;\
453 case ADDR_DIR_IDX_Y:\
454 args[0] = asR_W65_ABS8;\
455 print_operand (1, " <$0,y", args);\
456 size += 1;\
457 break;\
458 case ADDR_DIR_IND:\
459 args[0] = asR_W65_ABS8;\
460 print_operand (1, " (<$0)", args);\
461 size += 1;\
462 break;\
463 case ADDR_DIR_IDX_IND_X:\
464 args[0] = asR_W65_ABS8;\
465 print_operand (1, " (<$0,x)", args);\
466 size += 1;\
467 break;\
468 case ADDR_DIR_IND_IDX_Y:\
469 args[0] = asR_W65_ABS8;\
470 print_operand (1, " (<$0),y", args);\
471 size += 1;\
472 break;\
473 case ADDR_DIR_IND_LONG:\
474 args[0] = asR_W65_ABS8;\
475 print_operand (1, " [$0]", args);\
476 size += 1;\
477 break;\
478 case ADDR_DIR_IND_IDX_Y_LONG:\
479 args[0] = asR_W65_ABS8;\
480 print_operand (1, " [$0],y", args);\
481 size += 1;\
482 break;\
483 case ADDR_ABS:\
484 args[0] = asR_W65_ABS16;\
485 print_operand (1, " !$0", args);\
486 size += 2;\
487 break;\
488 case ADDR_ABS_IDX_X:\
489 args[0] = asR_W65_ABS16;\
490 print_operand (1, " !$0,x", args);\
491 size += 2;\
492 break;\
493 case ADDR_ABS_IDX_Y:\
494 args[0] = asR_W65_ABS16;\
495 print_operand (1, " !$0,y", args);\
496 size += 2;\
497 break;\
498 case ADDR_ABS_LONG:\
499 args[0] = asR_W65_ABS24;\
500 print_operand (1, " >$0", args);\
501 size += 3;\
502 break;\
503 case ADDR_ABS_IND_LONG:\
504 args[0] = asR_W65_ABS16;\
505 print_operand (1, " [>$0]", args);\
506 size += 2;\
507 break;\
508 case ADDR_ABS_LONG_IDX_X:\
509 args[0] = asR_W65_ABS24;\
510 print_operand (1, " >$0,x", args);\
511 size += 3;\
512 break;\
513 case ADDR_STACK_REL:\
514 args[0] = asR_W65_ABS8;\
515 print_operand (0, " $0,s", args);\
516 size += 1;\
517 break;\
518 case ADDR_STACK_REL_INDX_IDX:\
519 args[0] = asR_W65_ABS8;\
520 print_operand (0, " ($0,s),y", args);\
521 size += 1;\
522 break;\
523 case ADDR_ABS_IND:\
524 args[0] = asR_W65_ABS16;\
525 print_operand (1, " ($0)", args);\
526 size += 2;\
527 break;\
528 case ADDR_ABS_IND_IDX:\
529 args[0] = asR_W65_ABS16;\
530 print_operand (1, " ($0,x)", args);\
531 size += 2;\
532 break;\
533 case ADDR_BLOCK_MOVE:\
534 args[0] = (asR_W65_ABS16 >>8) &0xff;\
535 args[1] = ( asR_W65_ABS16 & 0xff);\
536 print_operand (0," $0,$1",args);\
537 size += 2;\
538 break;\
540 #define GETINFO(size,type,pcrel)\
541 case ADDR_IMMTOA: size = M==0 ? 2:1;type=M==0 ? R_W65_ABS16 : R_W65_ABS8;pcrel=0;break;\
542 case ADDR_IMMCOP: size = 1;type=R_W65_ABS8;pcrel=0;break;\
543 case ADDR_IMMTOI: size = X==0 ? 2:1;type=X==0 ? R_W65_ABS16 : R_W65_ABS8;pcrel=0;break;\
544 case ADDR_ACC: size = 0;type=-1;pcrel=0;break;\
545 case ADDR_PC_REL: size = 1;type=R_W65_PCR8;pcrel=0;break;\
546 case ADDR_PC_REL_LONG: size = 2;type=R_W65_PCR16;pcrel=0;break;\
547 case ADDR_IMPLIED: size = 0;type=-1;pcrel=0;break;\
548 case ADDR_STACK: size = 0;type=-1;pcrel=0;break;\
549 case ADDR_DIR: size = 1;type=R_W65_ABS8;pcrel=0;break;\
550 case ADDR_DIR_IDX_X: size = 1;type=R_W65_ABS8;pcrel=0;break;\
551 case ADDR_DIR_IDX_Y: size = 1;type=R_W65_ABS8;pcrel=0;break;\
552 case ADDR_DIR_IND: size = 1;type=R_W65_ABS8;pcrel=0;break;\
553 case ADDR_DIR_IDX_IND_X: size = 1;type=R_W65_ABS8;pcrel=0;break;\
554 case ADDR_DIR_IND_IDX_Y: size = 1;type=R_W65_ABS8;pcrel=0;break;\
555 case ADDR_DIR_IND_LONG: size = 1;type=R_W65_ABS8;pcrel=0;break;\
556 case ADDR_DIR_IND_IDX_Y_LONG: size = 1;type=R_W65_ABS8;pcrel=0;break;\
557 case ADDR_ABS: size = 2;type=R_W65_ABS16;pcrel=0;break;\
558 case ADDR_ABS_IDX_X: size = 2;type=R_W65_ABS16;pcrel=0;break;\
559 case ADDR_ABS_IDX_Y: size = 2;type=R_W65_ABS16;pcrel=0;break;\
560 case ADDR_ABS_LONG: size = 3;type=R_W65_ABS24;pcrel=0;break;\
561 case ADDR_ABS_IND_LONG: size = 2;type=R_W65_ABS16;pcrel=0;break;\
562 case ADDR_ABS_LONG_IDX_X: size = 3;type=R_W65_ABS24;pcrel=0;break;\
563 case ADDR_STACK_REL: size = 1;type=R_W65_ABS8;pcrel=0;break;\
564 case ADDR_STACK_REL_INDX_IDX: size = 1;type=R_W65_ABS8;pcrel=0;break;\
565 case ADDR_ABS_IND: size = 2;type=R_W65_ABS16;pcrel=0;break;\
566 case ADDR_ABS_IND_IDX: size = 2;type=R_W65_ABS16;pcrel=0;break;\
567 case ADDR_BLOCK_MOVE: size = 2;type=-1;pcrel=0;break;\