aboutsummaryrefslogtreecommitdiff
path: root/src/test/65c816
blob: 73a7e5bac05664c76b60915374b6f74a97b00b05 (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
543
544
545
546
547
548
	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
	.byte	255
	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
	rep #$12
	sep #$12
	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
	rep #$12
	sep #$12
	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