1
0
mirror of https://github.com/fadden/6502bench.git synced 2024-11-30 01:50:10 +00:00
6502bench/SourceGen/SGTestData/Expected/2003-allops-zero-65C02_64tass.S
Andy McFadden 32d1147eec Improve multi-encoding output in 64tass
Previously, we used the default character encoding from the project
properties to determine how strings and character constants in the
entire source file should be encoded.  Now we switch between
encodings as needed.  The default character encoding is no longer
relevant.

High ASCII is now an actual encoding, rather than acting like ASCII
that sometimes doesn't work.  Because we can do high ASCII character
operands with "| $80", we don't output a .enc to switch from ASCII
to high ASCII unless we need to generate a string.  (If we're
already in high ASCII mode, the "| $80" isn't required but won't
hurt anything.)

We now do a scan up front to see if ASCII or high ASCII is needed,
and only output the .cdefs for the encodings that are actually used.

The only gap in the matrix is high ASCII DCI strings -- the ".shift"
pseudo-op rejects text if the string doesn't start with the high
bit clear.
2019-08-21 13:46:05 -07:00

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