2018-10-23 23:06:29 +00:00
|
|
|
.cpu "65816"
|
|
|
|
* = $1000
|
|
|
|
.as
|
|
|
|
.xs
|
|
|
|
clc
|
|
|
|
xce
|
|
|
|
sep #$ff
|
|
|
|
jsr L1100
|
|
|
|
jsr L1107
|
|
|
|
jmp L2000
|
|
|
|
|
|
|
|
.logical $1100
|
|
|
|
L1100 bit L1100
|
|
|
|
L1103 lda #$11
|
|
|
|
ldx #$11
|
|
|
|
L1107 ldy #$11
|
|
|
|
per L1103
|
|
|
|
bra L1103
|
|
|
|
|
|
|
|
.here
|
|
|
|
.logical $1100
|
2019-11-17 01:15:03 +00:00
|
|
|
_L1100_0 bit _L1100_0
|
2018-10-23 23:06:29 +00:00
|
|
|
lda #$22
|
2019-11-17 01:15:03 +00:00
|
|
|
_L1105 ldx #$22
|
2018-10-23 23:06:29 +00:00
|
|
|
ldy #$22
|
2019-11-17 01:15:03 +00:00
|
|
|
per _L1105
|
|
|
|
jmp _L1105
|
2018-10-23 23:06:29 +00:00
|
|
|
|
|
|
|
.here
|
|
|
|
.logical $1100
|
2019-11-17 01:15:03 +00:00
|
|
|
_L1100_1 bit _L1100_1
|
2018-10-23 23:06:29 +00:00
|
|
|
lda #$33
|
|
|
|
ldx #$33
|
2019-11-17 01:15:03 +00:00
|
|
|
_L1107_0 ldy #$33
|
|
|
|
per _L1107_0
|
|
|
|
bra _L1107_0
|
2018-10-23 23:06:29 +00:00
|
|
|
|
|
|
|
.here
|
|
|
|
.logical $2000
|
|
|
|
L2000 bit L2000
|
|
|
|
beq $2018
|
2019-11-17 01:15:03 +00:00
|
|
|
bra _L2020
|
2018-10-23 23:06:29 +00:00
|
|
|
|
|
|
|
.here
|
|
|
|
.logical $2020
|
2019-11-17 01:15:03 +00:00
|
|
|
_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
|
2019-11-17 01:15:03 +00:00
|
|
|
brl _L2080
|
2018-10-23 23:06:29 +00:00
|
|
|
|
2019-11-17 01:15:03 +00:00
|
|
|
_offend nop
|
2018-10-23 23:06:29 +00:00
|
|
|
.here
|
|
|
|
.logical $2080
|
2019-11-17 01:15:03 +00:00
|
|
|
_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
|
2019-11-17 01:15:03 +00:00
|
|
|
lda _L2080-1
|
|
|
|
jsr _L2080-1
|
|
|
|
lda _L2080
|
|
|
|
jsr _L2080
|
2018-10-23 23:06:29 +00:00
|
|
|
lda $00
|
2019-11-17 01:15:03 +00:00
|
|
|
beq _L2100
|
2018-10-23 23:06:29 +00:00
|
|
|
.byte $ad
|
|
|
|
|
|
|
|
.here
|
|
|
|
.logical $2100
|
2019-11-17 01:15:03 +00:00
|
|
|
_L2100 nop
|
2018-10-23 23:06:29 +00:00
|
|
|
nop
|
2019-11-17 01:15:03 +00:00
|
|
|
jmp _L3000
|
2018-10-23 23:06:29 +00:00
|
|
|
|
|
|
|
.here
|
|
|
|
.logical $2800
|
|
|
|
.byte $00
|
|
|
|
.byte $28
|
|
|
|
.fill 14,$00
|
|
|
|
.here
|
|
|
|
.logical $2820
|
|
|
|
.fill 18,$00
|
|
|
|
|
|
|
|
.here
|
|
|
|
.logical $3000
|
2019-11-17 01:15:03 +00:00
|
|
|
_L3000 bit _L3000
|
2018-10-23 23:06:29 +00:00
|
|
|
lda #$44
|
|
|
|
ldx #$44
|
|
|
|
ldy #$44
|
2019-11-17 01:15:03 +00:00
|
|
|
brl _fwd
|
2018-10-23 23:06:29 +00:00
|
|
|
|
2019-11-17 01:15:03 +00:00
|
|
|
_ulabel .byte $00
|
2018-10-23 23:06:29 +00:00
|
|
|
.byte $01
|
|
|
|
.here
|
|
|
|
.logical $3100
|
2019-10-30 01:12:22 +00:00
|
|
|
.byte $02
|
2018-10-23 23:06:29 +00:00
|
|
|
|
2019-11-17 01:15:03 +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-10-23 23:06:29 +00:00
|
|
|
lda $300f
|
2019-11-17 01:15:03 +00:00
|
|
|
lda _fwd-1
|
|
|
|
beq _L3182
|
2018-10-23 23:06:29 +00:00
|
|
|
.byte $ea
|
|
|
|
.byte $ea
|
|
|
|
.here
|
|
|
|
.logical $3180
|
|
|
|
.byte $00
|
|
|
|
.byte $01
|
|
|
|
|
2019-11-17 01:15:03 +00:00
|
|
|
_L3182 bit _L3182
|
|
|
|
lda _label1
|
|
|
|
lda _label1+1
|
|
|
|
lda _label1+112
|
|
|
|
bra _L3200
|
2018-10-23 23:06:29 +00:00
|
|
|
|
2019-11-17 01:15:03 +00:00
|
|
|
_label1 .byte $ea
|
2018-10-23 23:06:29 +00:00
|
|
|
.byte $ea
|
|
|
|
|
|
|
|
.here
|
|
|
|
.logical $3200
|
2019-11-17 01:15:03 +00:00
|
|
|
_L3200 bit _L3200
|
2018-10-23 23:06:29 +00:00
|
|
|
.byte $00
|
|
|
|
.byte $01
|
|
|
|
.here
|