mirror of
https://github.com/fadden/6502bench.git
synced 2024-12-10 21:49:27 +00:00
3ff0fbae34
The regression tests were written with the assumption that all cross assemblers would support 6502, 65C02, and 65816 code. There are a few that support 65816 partially (e.g. ACME) or not at all. To best support these, we need to split some of the tests into pieces, so that important 6502 tests aren't skipped simply because parts of the test also exercise 65816 code. The first step is to change the regression test naming scheme. The old system used 1xxx for tests without project files, and 2xxx for tests with project files. The new system uses 1xxxN / 2xxxN, where N indicates the CPU type: 0 for 6502, 1 for 65C02, and 2 for 65816. For the 1xxxN tests the new value determines which CPU is used, which allows us to move the "allops" 6502/65C02 tests into the no-project category. For 2xxxN it just allows the 6502 and 65816 versions to have the same base name and number. This change updates the first batch of tests. It involves minor changes to the test harness and a whole bunch of renaming.
276 lines
5.4 KiB
ArmAsm
276 lines
5.4 KiB
ArmAsm
.cpu "65c02"
|
|
* = $1000
|
|
jsr L1014
|
|
jsr L108A
|
|
jsr L10C4
|
|
jsr L10D8
|
|
jsr L10F6
|
|
nop
|
|
nop
|
|
nop
|
|
brk
|
|
|
|
.byte $00
|
|
|
|
L1014 ora ($00,x)
|
|
.byte $02,$00
|
|
.byte $03
|
|
tsb $00
|
|
ora $00
|
|
asl $00
|
|
.byte $07
|
|
php
|
|
ora #$00
|
|
asl a
|
|
.byte $0b
|
|
tsb @w$0000
|
|
ora @w$0000
|
|
asl @w$0000
|
|
.byte $0f
|
|
bpl _L1031
|
|
_L1031 ora ($00),y
|
|
ora ($00)
|
|
.byte $13
|
|
trb $00
|
|
ora $00,x
|
|
asl $00,x
|
|
.byte $17
|
|
clc
|
|
ora $0000,y
|
|
inc a
|
|
.byte $1b
|
|
trb @w$0000
|
|
ora @w$0000,x
|
|
asl @w$0000,x
|
|
.byte $1f
|
|
jsr $0000
|
|
and ($00,x)
|
|
.byte $22,$00
|
|
.byte $23
|
|
bit $00
|
|
and $00
|
|
rol $00
|
|
.byte $27
|
|
plp
|
|
and #$00
|
|
rol a
|
|
.byte $2b
|
|
bit @w$0000
|
|
and @w$0000
|
|
rol @w$0000
|
|
.byte $2f
|
|
bmi _L106D
|
|
_L106D and ($00),y
|
|
and ($00)
|
|
.byte $33
|
|
bit $00,x
|
|
and $00,x
|
|
rol $00,x
|
|
.byte $37
|
|
sec
|
|
and $0000,y
|
|
dec a
|
|
.byte $3b
|
|
bit @w$0000,x
|
|
and @w$0000,x
|
|
rol @w$0000,x
|
|
.byte $3f
|
|
rti
|
|
|
|
L108A eor ($00,x)
|
|
.byte $42,$00
|
|
.byte $43
|
|
.byte $44,$00
|
|
eor $00
|
|
lsr $00
|
|
.byte $47
|
|
pha
|
|
eor #$00
|
|
lsr a
|
|
.byte $4b
|
|
jmp _L109E
|
|
|
|
_L109E eor @w$0000
|
|
lsr @w$0000
|
|
.byte $4f
|
|
bvc _L10A7
|
|
_L10A7 eor ($00),y
|
|
eor ($00)
|
|
.byte $53
|
|
.byte $54,$00
|
|
eor $00,x
|
|
lsr $00,x
|
|
.byte $57
|
|
cli
|
|
eor $0000,y
|
|
phy
|
|
.byte $5b
|
|
.byte $5c,$00,$00
|
|
eor @w$0000,x
|
|
lsr @w$0000,x
|
|
.byte $5f
|
|
rts
|
|
|
|
L10C4 adc ($00,x)
|
|
.byte $62,$00
|
|
.byte $63
|
|
stz $00
|
|
adc $00
|
|
ror $00
|
|
.byte $67
|
|
pla
|
|
adc #$00
|
|
ror a
|
|
.byte $6b
|
|
jmp ($0000)
|
|
|
|
L10D8 adc @w$0000
|
|
ror @w$0000
|
|
.byte $6f
|
|
bvs _L10E1
|
|
_L10E1 adc ($00),y
|
|
adc ($00)
|
|
.byte $73
|
|
stz $00,x
|
|
adc $00,x
|
|
ror $00,x
|
|
.byte $77
|
|
sei
|
|
adc $0000,y
|
|
ply
|
|
.byte $7b
|
|
jmp ($0000,x)
|
|
|
|
L10F6 adc @w$0000,x
|
|
ror @w$0000,x
|
|
.byte $7f
|
|
bra _L10FF
|
|
|
|
_L10FF sta ($00,x)
|
|
.byte $82,$00
|
|
.byte $83
|
|
sty $00
|
|
sta $00
|
|
stx $00
|
|
.byte $87
|
|
dey
|
|
bit #$00
|
|
txa
|
|
.byte $8b
|
|
sty @w$0000
|
|
sta @w$0000
|
|
stx @w$0000
|
|
.byte $8f
|
|
bcc _L111C
|
|
_L111C sta ($00),y
|
|
sta ($00)
|
|
.byte $93
|
|
sty $00,x
|
|
sta $00,x
|
|
stx $00,y
|
|
.byte $97
|
|
tya
|
|
sta $0000,y
|
|
txs
|
|
.byte $9b
|
|
stz @w$0000
|
|
sta @w$0000,x
|
|
stz @w$0000,x
|
|
.byte $9f
|
|
ldy #$00
|
|
lda ($00,x)
|
|
ldx #$00
|
|
.byte $a3
|
|
ldy $00
|
|
lda $00
|
|
ldx $00
|
|
.byte $a7
|
|
tay
|
|
lda #$00
|
|
tax
|
|
.byte $ab
|
|
ldy @w$0000
|
|
lda @w$0000
|
|
ldx @w$0000
|
|
.byte $af
|
|
bcs _L1157
|
|
_L1157 lda ($00),y
|
|
lda ($00)
|
|
.byte $b3
|
|
ldy $00,x
|
|
lda $00,x
|
|
ldx $00,y
|
|
.byte $b7
|
|
clv
|
|
lda $0000,y
|
|
tsx
|
|
.byte $bb
|
|
ldy @w$0000,x
|
|
lda @w$0000,x
|
|
ldx @w$0000,y
|
|
.byte $bf
|
|
cpy #$00
|
|
cmp ($00,x)
|
|
.byte $c2,$00
|
|
.byte $c3
|
|
cpy $00
|
|
cmp $00
|
|
dec $00
|
|
.byte $c7
|
|
iny
|
|
cmp #$00
|
|
dex
|
|
.byte $cb
|
|
cpy @w$0000
|
|
cmp @w$0000
|
|
dec @w$0000
|
|
.byte $cf
|
|
bne _L1192
|
|
_L1192 cmp ($00),y
|
|
cmp ($00)
|
|
.byte $d3
|
|
.byte $d4,$00
|
|
cmp $00,x
|
|
dec $00,x
|
|
.byte $d7
|
|
cld
|
|
cmp $0000,y
|
|
phx
|
|
.byte $db
|
|
.byte $dc,$00,$00
|
|
cmp @w$0000,x
|
|
dec @w$0000,x
|
|
.byte $df
|
|
cpx #$00
|
|
sbc ($00,x)
|
|
.byte $e2,$00
|
|
.byte $e3
|
|
cpx $00
|
|
sbc $00
|
|
inc $00
|
|
.byte $e7
|
|
inx
|
|
sbc #$00
|
|
nop
|
|
.byte $eb
|
|
cpx @w$0000
|
|
sbc @w$0000
|
|
inc @w$0000
|
|
.byte $ef
|
|
beq _L11CD
|
|
_L11CD sbc ($00),y
|
|
sbc ($00)
|
|
.byte $f3
|
|
.byte $f4,$00
|
|
sbc $00,x
|
|
inc $00,x
|
|
.byte $f7
|
|
sed
|
|
sbc $0000,y
|
|
plx
|
|
.byte $fb
|
|
.byte $fc,$00,$00
|
|
sbc @w$0000,x
|
|
inc @w$0000,x
|
|
.byte $ff
|