mirror of
https://github.com/fadden/6502bench.git
synced 2024-11-19 21:31:30 +00:00
cc6ebaffc5
When we have relocation data available, the code currently skips the process of matching an address with a label for a PEA instruction when the instruction in question doesn't have reloc data. This does a great job of separating code that pushes parts of addresses from code that pushes constants. This change expands the behavior to exclude instructions with 16-bit address operands that use the Data Bank Register, e.g. "LDA abs" and "LDA abs,X". This is particularly useful for code that accesses structured data using the operand as the structure offset, e.g. "LDX addr" / "LDA $0000,X" The 20212-reloc-data test has been updated to check the behavior.
22 lines
443 B
ArmAsm
22 lines
443 B
ArmAsm
; Copyright 2020 faddenSoft. All Rights Reserved.
|
|
; See the LICENSE.txt file for distribution terms (Apache 2.0).
|
|
;
|
|
; Segment #3 : code, load at specific address ($02/3456)
|
|
|
|
REL ;generate relocatable code
|
|
|
|
BANK2_START ENT
|
|
start ldal start
|
|
jsr later
|
|
|
|
ldy #BANK2_MOV_DST
|
|
ora $3456
|
|
oral $023456
|
|
rtl
|
|
|
|
BANK2_MOV_DST ENT
|
|
ds 16
|
|
|
|
later nop
|
|
rts
|