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