mirror of
https://github.com/fadden/6502bench.git
synced 2024-12-11 13:50:13 +00:00
824add17e8
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.
73 lines
1.2 KiB
ArmAsm
73 lines
1.2 KiB
ArmAsm
.cpu "65c02"
|
|
REALLYLONGLABELNAME = $8888 ;that's a long name
|
|
|
|
* = $1000
|
|
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
|
|
_X_uname
|
|
nop
|
|
_X_uname11
|
|
nop
|
|
_X_uname1
|
|
nop
|
|
_X_uname2
|
|
nop
|
|
lda #$00
|
|
_AND bne _AND ;local
|
|
JMP_1 bne JMP_1 ;global
|
|
jmp_1 bne jmp_1
|
|
TSB_1 bne TSB_1
|
|
XCE bne XCE
|
|
rts
|
|
|