1
0
mirror of https://github.com/fadden/6502bench.git synced 2024-12-02 13:51:36 +00:00
6502bench/SourceGen/SGTestData/Expected/2012-label-localizer_Merlin32.S
Andy McFadden 824add17e8 Remap labels that use opcode mnemonics
In a recent survey, three out of four cross assemblers surveyed
recommended not using opcode mnemonics to their patients who use
labels.  We now remap labels like "AND" and "jmp", using the label
map that's part of the label localizer.

We skip the step for Merlin 32, which is perfectly happy to assemble
"JMP JMP JMP".

Also, fixed a bug in MaskLeadingUnderscores that could hang the
source generator thread.
2019-09-20 15:29:34 -07:00

66 lines
1.1 KiB
ArmAsm

REALLYLONGLABELNAME equ $8888 ;that's a long name
org $1000
nop
_start lda :start
lda X_start
lda pastglob
lda :__nopped
:start nop
:__nopped
nop
X_start nop
pastglob nop
lda nlocal
nlocal lda #$11
reach1G nop
lda reach1G+1
lda :reach2+2
:reach2 nop
reach3G nop
:_reach4 nop
lda :_reach4-2
lda $00
beq :L102D
jsr :_reach4
jsr _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
:_uname nop
:X_uname11
nop
:X_uname1
nop
:X_uname nop
lda #$00
:AND bne :AND ;local
JMP bne JMP ;global
jmp bne jmp
TSB bne TSB
XCE bne XCE
rts