mirror of
https://github.com/fadden/6502bench.git
synced 2024-12-11 13:50:13 +00:00
387b50d827
Added support for "relative" address regions to the Merlin 32 and cc65 code generators. These generate "flat" address directives, and so were a little more complicated. Suppressed generation of relative operands for non-addressable regions. Also, tweaked the 20250-nested-regions test to include a negative relative region offset.
98 lines
1.6 KiB
ArmAsm
98 lines
1.6 KiB
ArmAsm
!cpu 6502
|
|
* = $0000
|
|
!word $3000 ;load address
|
|
|
|
!pseudopc $1000 {
|
|
!pseudopc *+$1000 {
|
|
!pseudopc *+$1000 {
|
|
L3000 bit L3000
|
|
@L3003 lda @L3003
|
|
and @LE003
|
|
jmp @L200C
|
|
|
|
}
|
|
@L200C bit @L200C
|
|
jmp @L1012
|
|
|
|
}
|
|
@L1012 bit @L1012
|
|
jsr @L4000
|
|
!pseudopc $0000 {
|
|
!byte $00
|
|
!pet "Null-term PETSCII string",$00
|
|
!byte $80
|
|
!word @L3003
|
|
!word @LE003
|
|
!byte $80
|
|
}
|
|
|
|
!pseudopc $4000 {
|
|
@L4000 bit @L4000
|
|
bit @L5000
|
|
bit @L500F
|
|
bit @L500F
|
|
nop
|
|
jmp @L4020
|
|
|
|
!pseudopc $5000 {
|
|
@L5000 bit @L5000
|
|
bit @L4000
|
|
nop
|
|
nop
|
|
@L5008 bit @L5008
|
|
bit @L5017
|
|
nop
|
|
@L500F rts
|
|
|
|
}
|
|
@L4020 bit @L4020
|
|
bit @L500F
|
|
nop
|
|
nop
|
|
nop
|
|
nop
|
|
nop
|
|
nop
|
|
nop
|
|
jmp @L4040
|
|
|
|
!pseudopc $5008 {
|
|
@L5008_0 bit @L5008_0
|
|
bit @L5000
|
|
nop
|
|
@L500F_0 bit @L500F_0
|
|
nop
|
|
nop
|
|
nop
|
|
nop
|
|
nop
|
|
@L5017 rts
|
|
|
|
}
|
|
@L4040 bit @L4040
|
|
bit @L5017
|
|
nop
|
|
jmp @LE000
|
|
|
|
}
|
|
!pseudopc *+$cf7e {
|
|
@LE000 bit @L200C
|
|
@LE003 nop
|
|
jmp @LD000
|
|
|
|
!pseudopc *-$1007 {
|
|
@LD000 bit @LD000
|
|
jmp @LF000
|
|
|
|
!pseudopc $f000 {
|
|
@LF000 bit @LF000
|
|
lda @L3003
|
|
and @LE003
|
|
nop
|
|
rts
|
|
|
|
}
|
|
}
|
|
}
|
|
}
|