2018-09-28 17:05:11 +00:00
|
|
|
.setcpu "65816"
|
2018-11-18 22:36:03 +00:00
|
|
|
; .segment "SEG000"
|
2020-10-17 23:10:48 +00:00
|
|
|
.org $021000
|
2018-09-28 17:05:11 +00:00
|
|
|
.a8
|
|
|
|
.i8
|
|
|
|
clc
|
|
|
|
xce
|
|
|
|
sep #$ff
|
2020-10-17 23:10:48 +00:00
|
|
|
jsr L21100 & $ffff
|
|
|
|
jsr L21107 & $ffff
|
|
|
|
jmp L22000 & $ffff
|
2018-09-28 17:05:11 +00:00
|
|
|
|
2018-11-18 22:36:03 +00:00
|
|
|
; .segment "SEG001"
|
2020-10-17 23:10:48 +00:00
|
|
|
.org $021100
|
|
|
|
L21100: bit L21100 & $ffff
|
|
|
|
L21103: lda #$11
|
2018-09-28 17:05:11 +00:00
|
|
|
ldx #$11
|
2020-10-17 23:10:48 +00:00
|
|
|
L21107: ldy #$11
|
|
|
|
per L21103
|
|
|
|
bra L21103
|
2018-09-28 17:05:11 +00:00
|
|
|
|
2018-11-18 22:36:03 +00:00
|
|
|
; .segment "SEG002"
|
2020-10-17 23:10:48 +00:00
|
|
|
.org $021100
|
|
|
|
@L21100_0: bit @L21100_0 & $ffff
|
2018-09-28 17:05:11 +00:00
|
|
|
lda #$22
|
2020-10-17 23:10:48 +00:00
|
|
|
@L21105: ldx #$22
|
2018-09-28 17:05:11 +00:00
|
|
|
ldy #$22
|
2020-10-17 23:10:48 +00:00
|
|
|
per @L21105
|
|
|
|
jmp @L21105 & $ffff
|
2018-09-28 17:05:11 +00:00
|
|
|
|
2018-11-18 22:36:03 +00:00
|
|
|
; .segment "SEG003"
|
2020-10-17 23:10:48 +00:00
|
|
|
.org $021100
|
|
|
|
@L21100_1: bit @L21100_1 & $ffff
|
2018-09-28 17:05:11 +00:00
|
|
|
lda #$33
|
|
|
|
ldx #$33
|
2020-10-17 23:10:48 +00:00
|
|
|
@L21107_0: ldy #$33
|
|
|
|
per @L21107_0
|
|
|
|
bra @L21107_0
|
2018-09-28 17:05:11 +00:00
|
|
|
|
2018-11-18 22:36:03 +00:00
|
|
|
; .segment "SEG004"
|
2020-10-17 23:10:48 +00:00
|
|
|
.org $022000
|
|
|
|
L22000: bit L22000 & $ffff
|
|
|
|
beq $022018
|
|
|
|
bra @L22020
|
2018-09-28 17:05:11 +00:00
|
|
|
|
2018-11-18 22:36:03 +00:00
|
|
|
; .segment "SEG005"
|
2020-10-17 23:10:48 +00:00
|
|
|
.org $022020
|
|
|
|
@L22020: bit @L22020 & $ffff
|
|
|
|
beq $022029
|
|
|
|
brl @L22080
|
2018-09-28 17:05:11 +00:00
|
|
|
|
2019-11-17 01:15:03 +00:00
|
|
|
@offend: nop
|
2018-11-18 22:36:03 +00:00
|
|
|
; .segment "SEG006"
|
2020-10-17 23:10:48 +00:00
|
|
|
.org $022080
|
|
|
|
@L22080: bit @L22080 & $ffff
|
|
|
|
lda @offend & $ffff
|
|
|
|
jsr @offend & $ffff
|
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
|
2020-10-17 23:10:48 +00:00
|
|
|
lda @L22080 & $ffff -1
|
|
|
|
jsr @L22080 & $ffff -1
|
|
|
|
lda @L22080 & $ffff
|
|
|
|
jsr @L22080 & $ffff
|
2018-09-28 17:05:11 +00:00
|
|
|
lda $00
|
2020-10-17 23:10:48 +00:00
|
|
|
beq @L22100
|
2018-09-28 17:05:11 +00:00
|
|
|
.byte $ad
|
|
|
|
|
2018-11-18 22:36:03 +00:00
|
|
|
; .segment "SEG007"
|
2020-10-17 23:10:48 +00:00
|
|
|
.org $022100
|
|
|
|
@L22100: nop
|
2018-09-28 17:05:11 +00:00
|
|
|
nop
|
2020-10-17 23:10:48 +00:00
|
|
|
jmp @L23000 & $ffff
|
2018-09-28 17:05:11 +00:00
|
|
|
|
2018-11-18 22:36:03 +00:00
|
|
|
; .segment "SEG008"
|
2020-10-17 23:10:48 +00:00
|
|
|
.org $022800
|
2018-09-28 17:05:11 +00:00
|
|
|
.byte $00
|
|
|
|
.byte $28
|
|
|
|
.res 14,$00
|
2018-11-18 22:36:03 +00:00
|
|
|
; .segment "SEG009"
|
2020-10-17 23:10:48 +00:00
|
|
|
.org $022820
|
2018-09-28 17:05:11 +00:00
|
|
|
.res 18,$00
|
|
|
|
|
2018-11-18 22:36:03 +00:00
|
|
|
; .segment "SEG010"
|
2020-10-17 23:10:48 +00:00
|
|
|
.org $023000
|
|
|
|
@L23000: bit @L23000 & $ffff
|
2018-09-28 17:05:11 +00:00
|
|
|
lda #$44
|
|
|
|
ldx #$44
|
|
|
|
ldy #$44
|
2019-11-17 01:15:03 +00:00
|
|
|
brl @fwd
|
2018-09-28 17:05:11 +00:00
|
|
|
|
2019-11-17 01:15:03 +00:00
|
|
|
@ulabel: .byte $00
|
2018-09-28 17:05:11 +00:00
|
|
|
.byte $01
|
2018-11-18 22:36:03 +00:00
|
|
|
; .segment "SEG011"
|
2020-10-17 23:10:48 +00:00
|
|
|
.org $023100
|
2019-10-30 01:12:22 +00:00
|
|
|
.byte $02
|
2018-09-28 17:05:11 +00:00
|
|
|
|
2020-10-17 23:10:48 +00:00
|
|
|
@fwd: bit @fwd & $ffff
|
|
|
|
lda @ulabel & $ffff
|
|
|
|
lda @ulabel & $ffff +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
|
2020-10-17 23:10:48 +00:00
|
|
|
lda @fwd & $ffff -1
|
|
|
|
beq @L23182
|
2018-09-28 17:05:11 +00:00
|
|
|
.byte $ea
|
|
|
|
.byte $ea
|
2018-11-18 22:36:03 +00:00
|
|
|
; .segment "SEG012"
|
2020-10-17 23:10:48 +00:00
|
|
|
.org $023180
|
2018-09-28 17:05:11 +00:00
|
|
|
.byte $00
|
|
|
|
.byte $01
|
|
|
|
|
2020-10-17 23:10:48 +00:00
|
|
|
@L23182: bit @L23182 & $ffff
|
|
|
|
lda @label1 & $ffff
|
|
|
|
lda @label1 & $ffff +1
|
|
|
|
lda @label1 & $ffff +112
|
|
|
|
bra @L23200
|
2018-09-28 17:05:11 +00:00
|
|
|
|
2019-11-17 01:15:03 +00:00
|
|
|
@label1: .byte $ea
|
2018-09-28 17:05:11 +00:00
|
|
|
.byte $ea
|
|
|
|
|
2018-11-18 22:36:03 +00:00
|
|
|
; .segment "SEG013"
|
2020-10-17 23:10:48 +00:00
|
|
|
.org $023200
|
|
|
|
@L23200: bit @L23200 & $ffff
|
2018-09-28 17:05:11 +00:00
|
|
|
.byte $00
|
|
|
|
.byte $01
|