1
0
mirror of https://github.com/fadden/6502bench.git synced 2024-11-03 23:06:09 +00:00
6502bench/SourceGen/SGTestData/Expected/20042-address-changes_Merlin32.S

108 lines
1.9 KiB
ArmAsm
Raw Normal View History

2018-09-28 17:05:11 +00:00
org $1000
clc
xce
sep #$ff
jsr L1100
jsr L1107
jmp L2000
org $1100
L1100 bit L1100
L1103 lda #$11
ldx #$11
L1107 ldy #$11
per L1103
bra L1103
org $1100
:L1100_0 bit :L1100_0
2018-09-28 17:05:11 +00:00
lda #$22
:L1105 ldx #$22
2018-09-28 17:05:11 +00:00
ldy #$22
per :L1105
jmp :L1105
2018-09-28 17:05:11 +00:00
org $1100
:L1100_1 bit :L1100_1
2018-09-28 17:05:11 +00:00
lda #$33
ldx #$33
:L1107_0 ldy #$33
per :L1107_0
bra :L1107_0
2018-09-28 17:05:11 +00:00
org $2000
L2000 bit L2000
beq $2018
bra :L2020
2018-09-28 17:05:11 +00:00
org $2020
:L2020 bit :L2020
Allow explicit widths in project/platform symbols, part 3 Implement multi-byte project/platform symbols by filling out a table of addresses. Each symbol is "painted" into the table, replacing an existing entry if the new entry has higher priority. This allows us to handle overlapping entries, giving boosted priority to platform symbols that are defined in .sym65 files loaded later. The bounds on project/platform symbols are now rigidly defined. If the "nearby" feature is enabled, references to SYM-1 will be picked up, but we won't go hunting for SYM+1 unless the symbol is at least two bytes wide. The cost of adding a symbol to the symbol table is about the same, but we don't have a quick way to remove a symbol. Previously, if two platform symbols had the same value, the symbol with the alphabetically lowest label would win. Now, the symbol defined in the most-recently-loaded file wins. (If you define two symbols with the same value in the same file, it's still resolved alphabetically.) This allows the user to pick the winner by arranging the load order of the platform symbol files. Platform symbols now keep a reference to the file ident of the symbol file that defined them, so we can show the symbols's source in the Info panel. These changes altered the behavior of test 2008-address-changes, which includes some tests on external addresses that are close to labeled internal addresses. The previous behavior essentially treated user labels as being 3 bytes wide and extending outside the file bounds, which was mildly convenient on occasion but felt a little skanky. (We could do with a way to define external symbols relative to internal symbols, for things like the source address of code that gets relocated.) Also, re-enabled some unit tests. Also, added a bit of identifying stuff to CrashLog.txt.
2019-10-02 23:26:05 +00:00
beq $2029
brl :L2080
2018-09-28 17:05:11 +00:00
:offend nop
2018-09-28 17:05:11 +00:00
org $2080
:L2080 bit :L2080
lda :offend
jsr :offend
Allow explicit widths in project/platform symbols, part 3 Implement multi-byte project/platform symbols by filling out a table of addresses. Each symbol is "painted" into the table, replacing an existing entry if the new entry has higher priority. This allows us to handle overlapping entries, giving boosted priority to platform symbols that are defined in .sym65 files loaded later. The bounds on project/platform symbols are now rigidly defined. If the "nearby" feature is enabled, references to SYM-1 will be picked up, but we won't go hunting for SYM+1 unless the symbol is at least two bytes wide. The cost of adding a symbol to the symbol table is about the same, but we don't have a quick way to remove a symbol. Previously, if two platform symbols had the same value, the symbol with the alphabetically lowest label would win. Now, the symbol defined in the most-recently-loaded file wins. (If you define two symbols with the same value in the same file, it's still resolved alphabetically.) This allows the user to pick the winner by arranging the load order of the platform symbol files. Platform symbols now keep a reference to the file ident of the symbol file that defined them, so we can show the symbols's source in the Info panel. These changes altered the behavior of test 2008-address-changes, which includes some tests on external addresses that are close to labeled internal addresses. The previous behavior essentially treated user labels as being 3 bytes wide and extending outside the file bounds, which was mildly convenient on occasion but felt a little skanky. (We could do with a way to define external symbols relative to internal symbols, for things like the source address of code that gets relocated.) Also, re-enabled some unit tests. Also, added a bit of identifying stuff to CrashLog.txt.
2019-10-02 23:26:05 +00:00
lda $2029
jsr $2029
lda :L2080-1
jsr :L2080-1
lda :L2080
jsr :L2080
2018-09-28 17:05:11 +00:00
lda $00
beq :L2100
2018-09-28 17:05:11 +00:00
dfb $ad
org $2100
:L2100 nop
2018-09-28 17:05:11 +00:00
nop
jmp :L3000
2018-09-28 17:05:11 +00:00
org $2800
dfb $00
dfb $28
ds 14
2018-09-28 17:05:11 +00:00
org $2820
ds 18
2018-09-28 17:05:11 +00:00
org $3000
:L3000 bit :L3000
2018-09-28 17:05:11 +00:00
lda #$44
ldx #$44
ldy #$44
brl :fwd
2018-09-28 17:05:11 +00:00
:ulabel dfb $00
2018-09-28 17:05:11 +00:00
dfb $01
org $3100
dfb $02
2018-09-28 17:05:11 +00:00
:fwd bit :fwd
lda :ulabel
lda :ulabel+1
Allow explicit widths in project/platform symbols, part 3 Implement multi-byte project/platform symbols by filling out a table of addresses. Each symbol is "painted" into the table, replacing an existing entry if the new entry has higher priority. This allows us to handle overlapping entries, giving boosted priority to platform symbols that are defined in .sym65 files loaded later. The bounds on project/platform symbols are now rigidly defined. If the "nearby" feature is enabled, references to SYM-1 will be picked up, but we won't go hunting for SYM+1 unless the symbol is at least two bytes wide. The cost of adding a symbol to the symbol table is about the same, but we don't have a quick way to remove a symbol. Previously, if two platform symbols had the same value, the symbol with the alphabetically lowest label would win. Now, the symbol defined in the most-recently-loaded file wins. (If you define two symbols with the same value in the same file, it's still resolved alphabetically.) This allows the user to pick the winner by arranging the load order of the platform symbol files. Platform symbols now keep a reference to the file ident of the symbol file that defined them, so we can show the symbols's source in the Info panel. These changes altered the behavior of test 2008-address-changes, which includes some tests on external addresses that are close to labeled internal addresses. The previous behavior essentially treated user labels as being 3 bytes wide and extending outside the file bounds, which was mildly convenient on occasion but felt a little skanky. (We could do with a way to define external symbols relative to internal symbols, for things like the source address of code that gets relocated.) Also, re-enabled some unit tests. Also, added a bit of identifying stuff to CrashLog.txt.
2019-10-02 23:26:05 +00:00
lda $300e
2018-09-28 17:05:11 +00:00
lda $300f
lda :fwd-1
beq :L3182
2018-09-28 17:05:11 +00:00
dfb $ea
dfb $ea
org $3180
dfb $00
dfb $01
:L3182 bit :L3182
lda :label1
lda :label1+1
lda :label1+112
bra :L3200
2018-09-28 17:05:11 +00:00
:label1 dfb $ea
2018-09-28 17:05:11 +00:00
dfb $ea
org $3200
:L3200 bit :L3200
2018-09-28 17:05:11 +00:00
dfb $00
dfb $01