mirror of
https://github.com/fadden/6502bench.git
synced 2024-12-03 05:49:48 +00:00
32d1147eec
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.
61 lines
1.0 KiB
ArmAsm
61 lines
1.0 KiB
ArmAsm
.cpu "65816"
|
|
REALLYLONGLABELNAME = $8888 ;that's a long name
|
|
|
|
* = $1000
|
|
.as
|
|
.xs
|
|
nop
|
|
X_start lda _start
|
|
lda X_start1
|
|
lda pastglob
|
|
lda _X__nopped
|
|
_start nop
|
|
_X__nopped
|
|
nop
|
|
X_start1
|
|
nop
|
|
pastglob
|
|
nop
|
|
lda nlocal
|
|
nlocal lda #$11
|
|
reach1G nop
|
|
lda reach1G+1
|
|
lda _reach2+2
|
|
_reach2 nop
|
|
reach3G nop
|
|
_X_reach4
|
|
nop
|
|
lda _X_reach4-2
|
|
lda $00
|
|
beq _L102D
|
|
jsr _X_reach4
|
|
jsr X_start
|
|
_L102D lda #$22
|
|
lda gtest2
|
|
gtest1 nop
|
|
lda gtest3
|
|
gtest2 nop
|
|
gtest3 nop
|
|
lda #$33
|
|
lda $1041
|
|
topglob nop
|
|
lda _L1043
|
|
nop
|
|
nop
|
|
_L1043 nop
|
|
lda #$44
|
|
globalnm
|
|
jsr _L104A
|
|
nop
|
|
_L104A nop
|
|
nop
|
|
nglobal nop
|
|
globlat jsr nglobal
|
|
bra end
|
|
|
|
end nop
|
|
EXCESSIVELY_LONG_LABEL
|
|
lda REALLYLONGLABELNAME
|
|
rts
|
|
|