mirror of
https://github.com/fadden/6502bench.git
synced 2024-12-02 13:51:36 +00:00
4322a0c231
We currently have two options for assembly code output, selected by a checkbox in the application settings: always put labels on the same lines as the instruction or data operand, or split the labels onto their own line if they were wider than the label text field. This change adds a third option, which puts labels on their own line whenever possible. Assemblers don't generally allow this for variable assignment pseudo-ops like "foo = $1000", but it's accepted for most other situations. This is a cosmetic change to the output, and will not affect the generated code. The old true/false app setting will be disregarded. "Split if too long" will be used by default. Added test 20280-label-placement to exercise the "split whenever allowed" behavior. The "export" function has a similar option that has not been updated (for no particular reason other than laziness). Also, simplified the app settings GetEnum / SetEnum calls, which can infer the enumerated type from the arguments. This should not impact behavior.
33 lines
729 B
ArmAsm
33 lines
729 B
ArmAsm
; Copyright 2024 faddenSoft. All Rights Reserved.
|
|
; See the LICENSE.txt file for distribution terms (Apache 2.0).
|
|
;
|
|
; The symbol __ENABLE_ALL_LABEL_NEWLINE must be defined in the project
|
|
; symbols, so that labels are placed on their own lines whenever possible.
|
|
;
|
|
; Assembler: Merlin 32
|
|
|
|
org $1000
|
|
shortnm equ $4000
|
|
SomewhatLongName equ $4001
|
|
|
|
lda shortnm
|
|
ldx SomewhatLongName
|
|
clc
|
|
bcc BranchTargetLongName
|
|
data dfb $cc
|
|
|
|
]ptr equ $00
|
|
]PointerWithLongName equ $02
|
|
|
|
BranchTargetLongName
|
|
sta ]ptr
|
|
stx ]PointerWithLongName
|
|
ldy data
|
|
lsr A
|
|
bcc shortb
|
|
shortb nop
|
|
|
|
jmp done
|
|
|
|
done rts
|