]> git.sur5r.net Git - cc65/blob - testcode/assembler/legal.s
fix merge fxxxup
[cc65] / testcode / assembler / legal.s
1
2         .setcpu         "6502"
3
4             adc $1234           ; 6d 34 12
5             adc $1234,x         ; 7d 34 12
6             adc $1234,y         ; 79 34 12
7             adc $12             ; 65 12
8             adc #$12            ; 69 12
9             adc ($12,x)         ; 61 12
10             adc $12,x           ; 75 12
11             adc ($12),y         ; 71 12
12
13             and $12             ; 25 12
14             and #$12            ; 29 12
15             and $1234           ; 2d 34 12
16             and $1234,x         ; 3d 34 12
17             and $1234,y         ; 39 34 12
18             and ($12,x)         ; 21 12
19             and $12,x           ; 35 12
20             and ($12),y         ; 31 12
21
22             asl $12             ; 06 12
23             asl $1234           ; 0e 34 12
24             asl $1234,x         ; 1e 34 12
25             asl $12,x           ; 16 12
26             asl a               ; 0a
27
28             bcc *+$14           ; 90 12
29             bcs *+$14           ; b0 12
30             beq *+$14           ; f0 12
31             bmi *+$14           ; 30 12
32             bne *+$14           ; d0 12
33             bpl *+$14           ; 10 12
34             bvc *+$14           ; 50 12
35             bvs *+$14           ; 70 12
36
37             bit $12             ; 24 12
38             bit $1234           ; 2c 34 12
39
40             brk                 ; 00
41
42             clc                 ; 18
43             cld                 ; d8
44             cli                 ; 58
45             clv                 ; b8
46
47             cmp $1234           ; cd 34 12
48             cmp $1234,x         ; dd 34 12
49             cmp $1234,y         ; d9 34 12
50             cmp $12             ; c5 12
51             cmp #$12            ; c9 12
52             cmp ($12,x)         ; c1 12
53             cmp $12,x           ; d5 12
54             cmp ($12),y         ; d1 12
55
56             cpx $1234           ; ec 34 12
57             cpx #$12            ; e0 12
58             cpx $12             ; e4 12
59
60             cpy $1234           ; cc 34 12
61             cpy #$12            ; c0 12
62             cpy $12             ; c4 12
63
64             dec $1234           ; ce 34 12
65             dec $1234,x         ; de 34 12
66             dec $12             ; c6 12
67             dec $12,x           ; d6 12
68
69             dex                 ; ca
70             dey                 ; 88
71
72             eor $1234           ; 4d 34 12
73             eor $1234,x         ; 5d 34 12
74             eor $1234,y         ; 59 34 12
75             eor $12             ; 45 12
76             eor #$12            ; 49 12
77             eor ($12,x)         ; 41 12
78             eor $12,x           ; 55 12
79             eor ($12),y         ; 51 12
80
81             inc $1234           ; ee 34 12
82             inc $1234,x         ; fe 34 12
83             inc $12             ; e6 12
84             inc $12,x           ; f6 12
85
86             inx                 ; e8
87             iny                 ; c8
88
89             jmp $1234           ; 4c 34 12
90             jmp ($1234)         ; 6c 34 12
91
92             jsr $1234           ; 20 34 12
93
94             lda $1234           ; ad 34 12
95             lda $1234,x         ; bd 34 12
96             lda $1234,y         ; b9 34 12
97             lda $12             ; a5 12
98             lda #$12            ; a9 12
99             lda ($12,x)         ; a1 12
100             lda $12,x           ; b5 12
101             lda ($12),y         ; b1 12
102
103             ldx $1234           ; ae 34 12
104             ldx $1234,y         ; be 34 12
105             ldx #$12            ; a2 12
106             ldx $12             ; a6 12
107             ldx $12,y           ; b6 12
108
109             ldy $1234           ; ac 34 12
110             ldy $1234,x         ; bc 34 12
111             ldy #$12            ; a0 12
112             ldy $12             ; a4 12
113             ldy $12,x           ; b4 12
114
115             lsr $1234           ; 4e 34 12
116             lsr $1234,x         ; 5e 34 12
117             lsr $12             ; 46 12
118             lsr $12,x           ; 56 12
119             lsr a               ; 4a
120
121             nop                 ; ea
122
123             ora $12             ; 05 12
124             ora #$12            ; 09 12
125             ora $1234           ; 0d 34 12
126             ora $1234,x         ; 1d 34 12
127             ora $1234,y         ; 19 34 12
128             ora ($12,x)         ; 01 12
129             ora $12,x           ; 15 12
130             ora ($12),y         ; 11 12
131
132             pha                 ; 48
133             php                 ; 08
134             pla                 ; 68
135             plp                 ; 28
136
137             rol $12             ; 26 12
138             rol $1234           ; 2e 34 12
139             rol $1234,x         ; 3e 34 12
140             rol $12,x           ; 36 12
141             rol a               ; 2a
142             ror $1234           ; 6e 34 12
143             ror $1234,x         ; 7e 34 12
144             ror $12             ; 66 12
145             ror $12,x           ; 76 12
146             ror a               ; 6a
147
148             rti                 ; 40
149             rts                 ; 60
150
151             sbc $1234           ; ed 34 12
152             sbc $1234,x         ; fd 34 12
153             sbc $1234,y         ; f9 34 12
154             sbc $12             ; e5 12
155             sbc #$12            ; e9 12
156             sbc ($12,x)         ; e1 12
157             sbc $12,x           ; f5 12
158             sbc ($12),y         ; f1 12
159
160             sec                 ; 38
161             sed                 ; f8
162             sei                 ; 78
163
164             sta $1234           ; 8d 34 12
165             sta $1234,x         ; 9d 34 12
166             sta $1234,y         ; 99 34 12
167             sta $12             ; 85 12
168             sta ($12,x)         ; 81 12
169             sta $12,x           ; 95 12
170             sta ($12),y         ; 91 12
171
172             stx $1234           ; 8e 34 12
173             stx $12             ; 86 12
174             stx $12,y           ; 96 12
175
176             sty $1234           ; 8c 34 12
177             sty $12             ; 84 12
178             sty $12,x           ; 94 12
179
180             tax                 ; aa
181             tay                 ; a8
182             tsx                 ; ba
183             txa                 ; 8a
184             txs                 ; 9a
185             tya                 ; 98