]> git.sur5r.net Git - cc65/blob - testcode/assembler/all.s
fix merge fxxxup
[cc65] / testcode / assembler / all.s
1         .setcpu         "6502X"
2
3 ; all legal and illegal opcodes as they would be disassembled by da65
4 ; note that this would not assemble into the exact same binary
5
6             brk                 ; 00
7             ora ($12,x)         ; 01 12
8             jam                 ; 02
9             slo ($12,x)         ; 03 12
10             nop $12             ; 04 12
11             ora $12             ; 05 12
12             asl $12             ; 06 12
13             slo $12             ; 07 12
14             php                 ; 08
15             ora #$12            ; 09 12
16             asl a               ; 0a
17             anc #$12            ; 0b 12
18             nop $1234           ; 0c 34 12
19             ora $1234           ; 0d 34 12
20             asl $1234           ; 0e 34 12
21             slo $1234           ; 0f 34 12
22             bpl *+$14           ; 10 12
23             ora ($12),y         ; 11 12
24             jam                 ; 12
25             slo ($12),y         ; 13 12
26             nop $12,x           ; 14 12
27             ora $12,x           ; 15 12
28             asl $12,x           ; 16 12
29             slo $12,x           ; 17 12
30             clc                 ; 18
31             ora $1234,y         ; 19 34 12
32             nop                 ; 1a
33             slo $1234,y         ; 1b 34 12
34             nop $1234,x         ; 1c 34 12
35             ora $1234,x         ; 1d 34 12
36             asl $1234,x         ; 1e 34 12
37             slo $1234,x         ; 1f 34 12
38             jsr $1234           ; 20 34 12
39             and ($12,x)         ; 21 12
40             jam                 ; 22
41             rla ($12,x)         ; 23 12
42             bit $12             ; 24 12
43             and $12             ; 25 12
44             rol $12             ; 26 12
45             rla $12             ; 27 12
46             plp                 ; 28
47             and #$12            ; 29 12
48             rol a               ; 2a
49             anc #$12            ; 2b 12
50             bit $1234           ; 2c 34 12
51             and $1234           ; 2d 34 12
52             rol $1234           ; 2e 34 12
53             rla $1234           ; 2f 34 12
54             bmi *+$14           ; 30 12
55             and ($12),y         ; 31 12
56             jam                 ; 32
57             rla ($12),y         ; 33 12
58             nop $12,x           ; 34 12
59             and $12,x           ; 35 12
60             rol $12,x           ; 36 12
61             rla $12,x           ; 37 12
62             sec                 ; 38
63             and $1234,y         ; 39 34 12
64             nop                 ; 3a
65             rla $1234,y         ; 3b 34 12
66             nop $1234,x         ; 3c 34 12
67             and $1234,x         ; 3d 34 12
68             rol $1234,x         ; 3e 34 12
69             rla $1234,x         ; 3f 34 12
70             rti                 ; 40
71             eor ($12,x)         ; 41 12
72             jam                 ; 42
73             sre ($12,x)         ; 43 12
74             nop $12             ; 44 12
75             eor $12             ; 45 12
76             lsr $12             ; 46 12
77             sre $12             ; 47 12
78             pha                 ; 48
79             eor #$12            ; 49 12
80             lsr a               ; 4a
81             alr #$12            ; 4b 12
82             jmp $1234           ; 4c 34 12
83             eor $1234           ; 4d 34 12
84             lsr $1234           ; 4e 34 12
85             sre $1234           ; 4f 34 12
86             bvc *+$14           ; 50 12
87             eor ($12),y         ; 51 12
88             jam                 ; 52
89             sre ($12),y         ; 53 12
90             nop $12,x           ; 54 12
91             eor $12,x           ; 55 12
92             lsr $12,x           ; 56 12
93             sre $12,x           ; 57 12
94             cli                 ; 58
95             eor $1234,y         ; 59 34 12
96             nop                 ; 5a
97             sre $1234,y         ; 5b 34 12
98             nop $1234,x         ; 5c 34 12
99             eor $1234,x         ; 5d 34 12
100             lsr $1234,x         ; 5e 34 12
101             sre $1234,x         ; 5f 34 12
102             rts                 ; 60
103             adc ($12,x)         ; 61 12
104             jam                 ; 62
105             rra ($12,x)         ; 63 12
106             nop $12             ; 64 12
107             adc $12             ; 65 12
108             ror $12             ; 66 12
109             rra $12             ; 67 12
110             pla                 ; 68
111             adc #$12            ; 69 12
112             ror a               ; 6a
113             arr #$12            ; 6b 12
114             jmp ($1234)         ; 6c 34 12
115             adc $1234           ; 6d 34 12
116             ror $1234           ; 6e 34 12
117             rra $1234           ; 6f 34 12
118             bvs *+$14           ; 70 12
119             adc ($12),y         ; 71 12
120             jam                 ; 72
121             rra ($12),y         ; 73 12
122             nop $12,x           ; 74 12
123             adc $12,x           ; 75 12
124             ror $12,x           ; 76 12
125             rra $12,x           ; 77 12
126             sei                 ; 78
127             adc $1234,y         ; 79 34 12
128             nop                 ; 7a
129             rra $1234,y         ; 7b 34 12
130             nop $1234,x         ; 7c 34 12
131             adc $1234,x         ; 7d 34 12
132             ror $1234,x         ; 7e 34 12
133             rra $1234,x         ; 7f 34 12
134             nop #$12            ; 80 12
135             sta ($12,x)         ; 81 12
136             nop #$12            ; 82 12
137             sax ($12,x)         ; 83 12
138             sty $12             ; 84 12
139             sta $12             ; 85 12
140             stx $12             ; 86 12
141             sax $12             ; 87 12
142             dey                 ; 88
143             nop #$12            ; 89 12
144             txa                 ; 8a
145             ane #$12            ; 8b 12
146             sty $1234           ; 8c 34 12
147             sta $1234           ; 8d 34 12
148             stx $1234           ; 8e 34 12
149             sax $1234           ; 8f 34 12
150             bcc *+$14           ; 90 12
151             sta ($12),y         ; 91 12
152             jam                 ; 92
153             sha ($12),y         ; 93 12
154             sty $12,x           ; 94 12
155             sta $12,x           ; 95 12
156             stx $12,y           ; 96 12
157             sax $12,y           ; 97 12
158             tya                 ; 98
159             sta $1234,y         ; 99 34 12
160             txs                 ; 9a
161             tas $1234,y         ; 9b 34 12
162             shy $1234,x         ; 9c 34 12
163             sta $1234,x         ; 9d 34 12
164             shx $1234,y         ; 9e 34 12
165             sha $1234,y         ; 9f 34 12
166             ldy #$12            ; a0 12
167             lda ($12,x)         ; a1 12
168             ldx #$12            ; a2 12
169             lax ($12,x)         ; a3 12
170             ldy $12             ; a4 12
171             lda $12             ; a5 12
172             ldx $12             ; a6 12
173             lax $12             ; a7 12
174             tay                 ; a8
175             lda #$12            ; a9 12
176             tax                 ; aa
177             lax #$12            ; ab 12
178             ldy $1234           ; ac 34 12
179             lda $1234           ; ad 34 12
180             ldx $1234           ; ae 34 12
181             lax $1234           ; af 34 12
182             bcs *+$14           ; b0 12
183             lda ($12),y         ; b1 12
184             jam                 ; b2
185             lax ($12),y         ; b3 12
186             ldy $12,x           ; b4 12
187             lda $12,x           ; b5 12
188             ldx $12,y           ; b6 12
189             lax $12,y           ; b7 12
190             clv                 ; b8
191             lda $1234,y         ; b9 34 12
192             tsx                 ; ba
193             las $1234,y         ; bb 34 12
194             ldy $1234,x         ; bc 34 12
195             lda $1234,x         ; bd 34 12
196             ldx $1234,y         ; be 34 12
197             lax $1234,y         ; bf 34 12
198             cpy #$12            ; c0 12
199             cmp ($12,x)         ; c1 12
200             nop #$12            ; c2 12
201             dcp ($12,x)         ; c3 12
202             cpy $12             ; c4 12
203             cmp $12             ; c5 12
204             dec $12             ; c6 12
205             dcp $12             ; c7 12
206             iny                 ; c8
207             cmp #$12            ; c9 12
208             dex                 ; ca
209             axs #$12            ; cb 12
210             cpy $1234           ; cc 34 12
211             cmp $1234           ; cd 34 12
212             dec $1234           ; ce 34 12
213             dcp $1234           ; cf 34 12
214             bne *+$14           ; d0 12
215             cmp ($12),y         ; d1 12
216             jam                 ; d2
217             dcp ($12),y         ; d3 12
218             nop $12,x           ; d4 12
219             cmp $12,x           ; d5 12
220             dec $12,x           ; d6 12
221             dcp $12,x           ; d7 12
222             cld                 ; d8
223             cmp $1234,y         ; d9 34 12
224             nop                 ; da
225             dcp $1234,y         ; db 34 12
226             nop $1234,x         ; dc 34 12
227             cmp $1234,x         ; dd 34 12
228             dec $1234,x         ; de 34 12
229             dcp $1234,x         ; df 34 12
230             cpx #$12            ; e0 12
231             sbc ($12,x)         ; e1 12
232             nop #$12            ; e2 12
233             isc ($12,x)         ; e3 12
234             cpx $12             ; e4 12
235             sbc $12             ; e5 12
236             inc $12             ; e6 12
237             isc $12             ; e7 12
238             inx                 ; e8
239             sbc #$12            ; e9 12
240             nop                 ; ea
241             sbc #$12            ; eb 12
242             cpx $1234           ; ec 34 12
243             sbc $1234           ; ed 34 12
244             inc $1234           ; ee 34 12
245             isc $1234           ; ef 34 12
246             beq *+$14           ; f0 12
247             sbc ($12),y         ; f1 12
248             jam                 ; f2
249             isc ($12),y         ; f3 12
250             nop $12,x           ; f4 12
251             sbc $12,x           ; f5 12
252             inc $12,x           ; f6 12
253             isc $12,x           ; f7 12
254             sed                 ; f8
255             sbc $1234,y         ; f9 34 12
256             isc $1234,y         ; fb 34 12
257             nop $1234,x         ; fc 34 12
258             sbc $1234,x         ; fd 34 12
259             inc $1234,x         ; fe 34 12
260             isc $1234,x         ; ff 34 12