aboutsummaryrefslogtreecommitdiff
path: root/src/test/65c816
blob: cfa6895d72b8373685ab28ce3608b3a45e19622c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
	cpu 65C816
	
	org $8000
	
	clc
	xce
	
	mx 16,16
	rep #$30
	
	adc ($10,X)
	adc $32,S
	adc $10
	adc [$10]
	adc #$54
	adc $9876
	adc $FEDBCA
	adc ($10),Y
	adc ($10)
	adc ($32,S),Y
	adc $10,X
	adc [$10],Y
	adc $9876,Y
	adc $9876,X
	adc $FEDCBA,X
	sbc ($10,X)
	sbc $32,S
	sbc $10
	sbc [$10]
	sbc #$54
	sbc $9876
	sbc $FEDBCA
	sbc ($10),Y
	sbc ($10)
	sbc ($32,S),Y
	sbc $10,X
	sbc [$10],Y
	sbc $9876,Y
	sbc $9876,X
	sbc $FEDCBA,X
	cmp ($10,X)
	cmp $32,S
	cmp $10
	cmp [$10]
	cmp #$54
	cmp $9876
	cmp $FEDBCA
	cmp ($10),Y
	cmp ($10)
	cmp ($32,S),Y
	cmp $10,X
	cmp [$10],Y
	cmp $9876,Y
	cmp $9876,X
	cmp $FEDCBA,X
	cpx #$54
	cpx $10
	cpx $9876
	cpy #$54
	cpy $10
	cpy $9876
	dec
	dec $10
	dec $9876
	dec $10,X
	dec $9876,X
	dex
	dey
	inc
	inc $10
	inc $9876
	inc $10,X
	inc $9876,X
	inx
	iny
	and ($10,X)
	and $32,S
	and $10
	and [$10]
	and #$54
	and $9876
	and $FEDBCA
	and ($10),Y
	and ($10)
	and ($32,S),Y
	and $10,X
	and [$10],Y
	and $9876,Y
	and $9876,X
	and $FEDCBA,X
	eor ($10,X)
	eor $32,S
	eor $10
	eor [$10]
	eor #$54
	eor $9876
	eor $FEDBCA
	eor ($10),Y
	eor ($10)
	eor ($32,S),Y
	eor $10,X
	eor [$10],Y
	eor $9876,Y
	eor $9876,X
	eor $FEDCBA,X
	ora ($10,X)
	ora $32,S
	ora $10
	ora [$10]
	ora #$54
	ora $9876
	ora $FEDBCA
	ora ($10),Y
	ora ($10)
	ora ($32,S),Y
	ora $10,X
	ora [$10],Y
	ora $9876,Y
	ora $9876,X
	ora $FEDCBA,X
	bit $10
	bit $9876
	bit $10,X
	bit $9876,X
	bit #$54
	trb $10
	trb $9876
	tsb $10
	tsb $9876
	asl $10
	asl
	asl $9876
	asl $10,X
	asl $9876,X
	lsr $10
	lsr
	lsr $9876
	lsr $10,X
	lsr $9876,X
	rol $10
	rol
	rol $9876
	rol $10,X
	rol $9876,X
	ror $10
	ror
	ror $9876
	ror $10,X
	ror $9876,X
	bcc LABEL1
	bcs LABEL1
	beq LABEL1
	bmi LABEL1
	bne LABEL1
	bpl LABEL1
	bra LABEL1
	bvc LABEL1
	bvs LABEL1
	brl LABEL1
	brl LABEL2
	
label1:
	nop
	brk 255
	nop
	brk
	
	
	jmp $1234
	jmp $FEDCBA
	jmp ($1234)
	jmp ($1234,X)
	jmp [$1234]
	jsl $123456
	jsr $1234
	jsr ($1234,X)
	rtl
	rts
	brk
	cop #$12
	rti
	clc
	cld
	cli
	clv
	sec
	sed
	sei
	lda ($10,X)
	lda $32,S
	lda $10
	lda [$10]
	lda #$54
	lda $9876
	lda $FEDBCA
	lda ($10),Y
	lda ($10)
	lda ($32,S),Y
	lda $10,X
	lda [$10],Y
	lda $9876,Y
	lda $9876,X
	lda $FEDCBA,X
	ldx #$54
	ldx $10
	ldx $9876
	ldx $10,Y
	ldx $9876,Y
	ldy #$54
	ldy $10
	ldy $9876
	ldy $10,X
	ldy $9876,X
	sta ($10,X)
	sta $32,S
	sta $10
	sta [$10]
	sta $9876
	sta $FEDBCA
	sta ($10),Y
	sta ($10)
	sta ($32,S),Y
	sta $10,X
	sta [$10],Y
	sta $9876,Y
	sta $9876,X
	sta $FEDCBA,X
	stx $10
	stx $9876
	stx $10,Y
	sty $10
	sty $9876
	sty $10,X
	stz $10
	stz $10,X
	stz $9876
	stz $9876,X
	mvn #$12,#$34
	mvp #$12,#$34
	nop
	wdm
	pea #$1234
	pei $12
	per LABEL1
	pha
	phx
	phy
	pla
	plx
	ply
	phb
	phd
	phk
	php
	plb
	pld
	plp
	stp
	wai
	tax
	tay
	tsx
	txa
	txs
	txy
	tya
	tyx
	tcd
	tcs
	tdc
	tsc
	xba
	xce
	
	
	mx 8,8
	sep #$30
	
	adc ($10,X)
	adc $32,S
	adc $10
	adc [$10]
	adc #$54
	adc $9876
	adc $FEDBCA
	adc ($10),Y
	adc ($10)
	adc ($32,S),Y
	adc $10,X
	adc [$10],Y
	adc $9876,Y
	adc $9876,X
	adc $FEDCBA,X
	sbc ($10,X)
	sbc $32,S
	sbc $10
	sbc [$10]
	sbc #$54
	sbc $9876
	sbc $FEDBCA
	sbc ($10),Y
	sbc ($10)
	sbc ($32,S),Y
	sbc $10,X
	sbc [$10],Y
	sbc $9876,Y
	sbc $9876,X
	sbc $FEDCBA,X
	cmp ($10,X)
	cmp $32,S
	cmp $10
	cmp [$10]
	cmp #$54
	cmp $9876
	cmp $FEDBCA
	cmp ($10),Y
	cmp ($10)
	cmp ($32,S),Y
	cmp $10,X
	cmp [$10],Y
	cmp $9876,Y
	cmp $9876,X
	cmp $FEDCBA,X
	cpx #$54
	cpx $10
	cpx $9876
	cpy #$54
	cpy $10
	cpy $9876
	dec
	dec $10
	dec $9876
	dec $10,X
	dec $9876,X
	dex
	dey
	inc
	inc $10
	inc $9876
	inc $10,X
	inc $9876,X
	inx
	iny
	and ($10,X)
	and $32,S
	and $10
	and [$10]
	and #$54
	and $9876
	and $FEDBCA
	and ($10),Y
	and ($10)
	and ($32,S),Y
	and $10,X
	and [$10],Y
	and $9876,Y
	and $9876,X
	and $FEDCBA,X
	eor ($10,X)
	eor $32,S
	eor $10
	eor [$10]
	eor #$54
	eor $9876
	eor $FEDBCA
	eor ($10),Y
	eor ($10)
	eor ($32,S),Y
	eor $10,X
	eor [$10],Y
	eor $9876,Y
	eor $9876,X
	eor $FEDCBA,X
	ora ($10,X)
	ora $32,S
	ora $10
	ora [$10]
	ora #$54
	ora $9876
	ora $FEDBCA
	ora ($10),Y
	ora ($10)
	ora ($32,S),Y
	ora $10,X
	ora [$10],Y
	ora $9876,Y
	ora $9876,X
	ora $FEDCBA,X
	bit $10
	bit $9876
	bit $10,X
	bit $9876,X
	bit #$54
	trb $10
	trb $9876
	tsb $10
	tsb $9876
	asl $10
	asl
	asl $9876
	asl $10,X
	asl $9876,X
	lsr $10
	lsr
	lsr $9876
	lsr $10,X
	lsr $9876,X
	rol $10
	rol
	rol $9876
	rol $10,X
	rol $9876,X
	ror $10
	ror
	ror $9876
	ror $10,X
	ror $9876,X
	bcc LABEL2
	bcs LABEL2
	beq LABEL2
	bmi LABEL2
	bne LABEL2
	bpl LABEL2
	bra LABEL2
	bvc LABEL2
	bvs LABEL2
	brl LABEL1
	brl LABEL2
	
label2:
	nop
	brk
	.byte 0
	nop
	brk
	.byte $E5
	
	jmp $1234
	jmp $FEDCBA
	jmp ($1234)
	jmp ($1234,X)
	jmp [$1234]
	jsl $123456
	jsr $1234
	jsr ($1234,X)
	rtl
	rts
	brk
	cop #$12
	rti
	clc
	cld
	cli
	clv
	sec
	sed
	sei
	lda ($10,X)
	lda $32,S
	lda $10
	lda [$10]
	lda #$54
	lda $9876
	lda $FEDBCA
	lda ($10),Y
	lda ($10)
	lda ($32,S),Y
	lda $10,X
	lda [$10],Y
	lda $9876,Y
	lda $9876,X
	lda $FEDCBA,X
	ldx #$54
	ldx $10
	ldx $9876
	ldx $10,Y
	ldx $9876,Y
	ldy #$54
	ldy $10
	ldy $9876
	ldy $10,X
	ldy $9876,X
	sta ($10,X)
	sta $32,S
	sta $10
	sta [$10]
	sta $9876
	sta $FEDBCA
	sta ($10),Y
	sta ($10)
	sta ($32,S),Y
	sta $10,X
	sta [$10],Y
	sta $9876,Y
	sta $9876,X
	sta $FEDCBA,X
	stx $10
	stx $9876
	stx $10,Y
	sty $10
	sty $9876
	sty $10,X
	stz $10
	stz $10,X
	stz $9876
	stz $9876,X
	mvn #$12,#$34
	mvp #$12,#$34
	nop
	wdm
	pea #$1234
	pei $12
	per LABEL2
	pha
	phx
	phy
	pla
	plx
	ply
	phb
	phd
	phk
	php
	plb
	pld
	plp
	stp
	wai
	tax
	tay
	tsx
	txa
	txs
	txy
	tya
	tyx
	tcd
	tcs
	tdc
	tsc
	xba
	xce