mirror of
https://github.com/marketideas/qasm.git
synced 2025-01-27 19:39:40 +00:00
Merge pull request #59 from ksherlock/rel_ds
qlinkgs: Fix rel DS handling
This commit is contained in:
commit
b6826d0df4
@ -1800,7 +1800,7 @@ lnkop sec
|
|||||||
bit :dsvalid
|
bit :dsvalid
|
||||||
jpl :xit
|
jpl :xit
|
||||||
ldy :dsy
|
ldy :dsy
|
||||||
lda :aux
|
lda :rel
|
||||||
and #$FF
|
and #$FF
|
||||||
eor #$FF
|
eor #$FF
|
||||||
inc
|
inc
|
||||||
@ -1820,6 +1820,15 @@ lnkop sec
|
|||||||
psl :handle
|
psl :handle
|
||||||
_GetHandleSize
|
_GetHandleSize
|
||||||
pll :size
|
pll :size
|
||||||
|
|
||||||
|
sec
|
||||||
|
lda :size
|
||||||
|
sbc :aux
|
||||||
|
sta :rsize
|
||||||
|
lda :size+2
|
||||||
|
sbc #0
|
||||||
|
sta :rsize+2
|
||||||
|
|
||||||
lda :more
|
lda :more
|
||||||
clc
|
clc
|
||||||
adc :size
|
adc :size
|
||||||
@ -1867,9 +1876,7 @@ lnkop sec
|
|||||||
sta :dest+2
|
sta :dest+2
|
||||||
psl :src
|
psl :src
|
||||||
psl :dest
|
psl :dest
|
||||||
pea $00
|
psl :rsize
|
||||||
lda :more
|
|
||||||
pha
|
|
||||||
_BlockMove
|
_BlockMove
|
||||||
ldy :aux
|
ldy :aux
|
||||||
ldx #$00
|
ldx #$00
|
||||||
@ -1912,6 +1919,7 @@ lnkop sec
|
|||||||
:dest ds 4
|
:dest ds 4
|
||||||
:byte ds 2
|
:byte ds 2
|
||||||
:temp ds 4
|
:temp ds 4
|
||||||
|
:rsize ds 4
|
||||||
|
|
||||||
:constrainterr php
|
:constrainterr php
|
||||||
rep $30
|
rep $30
|
||||||
|
6
testdata/3012-rel-ds-1.S
vendored
Normal file
6
testdata/3012-rel-ds-1.S
vendored
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
rel
|
||||||
|
|
||||||
|
nop
|
||||||
|
nop
|
||||||
|
|
||||||
|
sav 3012-rel-ds-1.L
|
16
testdata/3012-rel-ds-2.S
vendored
Normal file
16
testdata/3012-rel-ds-2.S
vendored
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
rel
|
||||||
|
|
||||||
|
|
||||||
|
a ent
|
||||||
|
b ent
|
||||||
|
c ent
|
||||||
|
nop
|
||||||
|
nop
|
||||||
|
|
||||||
|
* should generate $100 - 4 bytes of $ff since 2 bytes in first file, 2 bytes above.
|
||||||
|
* extra ent labels to verify the DS padding algorithm adjusts the relacation records.
|
||||||
|
|
||||||
|
ds \,$ff
|
||||||
|
d ent
|
||||||
|
|
||||||
|
sav 3012-rel-ds-2.L
|
9
testdata/3012-rel-ds-3.S
vendored
Normal file
9
testdata/3012-rel-ds-3.S
vendored
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
rel
|
||||||
|
|
||||||
|
ext a,b,c,d
|
||||||
|
|
||||||
|
dw a,b,c,d
|
||||||
|
|
||||||
|
ds \,$00
|
||||||
|
|
||||||
|
sav 3012-rel-ds-3.L
|
15
testdata/3012-rel-ds-link.S
vendored
Normal file
15
testdata/3012-rel-ds-link.S
vendored
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
*
|
||||||
|
* test rel DS \ command to verify it uses the current segment offset,
|
||||||
|
* not the current file offset.
|
||||||
|
*
|
||||||
|
|
||||||
|
ovr all
|
||||||
|
asm 3012-rel-ds-1.S
|
||||||
|
asm 3012-rel-ds-2.S
|
||||||
|
asm 3012-rel-ds-3.S
|
||||||
|
|
||||||
|
lnk 3012-rel-ds-1.L
|
||||||
|
lnk 3012-rel-ds-2.L
|
||||||
|
lnk 3012-rel-ds-3.L
|
||||||
|
|
||||||
|
sav 3012-rel-ds
|
Loading…
x
Reference in New Issue
Block a user