1
0
mirror of https://github.com/fadden/6502bench.git synced 2024-07-14 05:28:55 +00:00
6502bench/SourceGen/SGTestData/Expected/1002-embedded-instructions_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

78 lines
1.3 KiB
ArmAsm

.cpu "65816"
* = $1000
.as
.xs
clc
xce
sep #$30
jsr L1014
jsr L101C
jsr L102A
jsr L102F
jsr L1059
rts
L1014 lda #$00
.byte $2c
L1017 lda #$01
beq L1017
rts
L101C sep #$30
lda $00
beq L1025
lda #$00
brk
L1025 sta $012345
rts
L102A .byte $20
L102B rts
.byte $ea
bra L102B
L102F .byte $2c
L1030 .byte $2c
L1031 .byte $2c
L1032 .byte $2c
L1033 .byte $2c
L1034 .byte $2c
L1035 .byte $2c
L1036 .byte $2c
L1037 .byte $2c
L1038 nop
nop
asl a
bcc L102F
asl a
bcc L1030
asl a
bcc L1031
asl a
bcc L1032
asl a
bcc L1033
asl a
bcc L1034
asl a
bcc L1035
asl a
bcc L1036
asl a
bcc L1037
asl a
bcc L1038
rts
L1059 .byte $2c
L105A nop
.byte $ad
L105C lda $00
asl a
bcc L105A
asl a
bcc L105C
.byte $af