mirror of
https://github.com/marketideas/qasm.git
synced 2024-06-13 03:29:33 +00:00
Merge pull request #56 from ksherlock/export-gequ
qlinkgs : make GEQU symbols available to the linker
This commit is contained in:
commit
1d23d8c76d
|
@ -2464,7 +2464,7 @@ relocatefinal
|
||||||
sta [tempptr],y
|
sta [tempptr],y
|
||||||
sta omfoff2
|
sta omfoff2
|
||||||
lda foundlable+o_labtype
|
lda foundlable+o_labtype
|
||||||
and #linkabsbit
|
and #linkabsbit.linkgeqbit
|
||||||
jne :clc
|
jne :clc
|
||||||
lda #$02
|
lda #$02
|
||||||
sta omfbytes
|
sta omfbytes
|
||||||
|
@ -2549,7 +2549,7 @@ relocatefinal
|
||||||
sta [tempptr],y
|
sta [tempptr],y
|
||||||
|
|
||||||
lda foundlable+o_labtype
|
lda foundlable+o_labtype
|
||||||
and #linkabsbit
|
and #linkabsbit.linkgeqbit
|
||||||
jne :clc
|
jne :clc
|
||||||
|
|
||||||
bit interseg
|
bit interseg
|
||||||
|
@ -2690,7 +2690,7 @@ relocatefinal
|
||||||
sta [tempptr],y
|
sta [tempptr],y
|
||||||
rep $20
|
rep $20
|
||||||
lda foundlable+o_labtype
|
lda foundlable+o_labtype
|
||||||
and #linkabsbit ;absolute lable?
|
and #linkabsbit.linkgeqbit ;absolute lable?
|
||||||
jne :clc
|
jne :clc
|
||||||
|
|
||||||
bit interseg
|
bit interseg
|
||||||
|
@ -2791,7 +2791,7 @@ relocatefinal
|
||||||
sta [tempptr],y
|
sta [tempptr],y
|
||||||
rep $20
|
rep $20
|
||||||
lda foundlable+o_labtype
|
lda foundlable+o_labtype
|
||||||
and #linkabsbit
|
and #linkabsbit.linkgeqbit
|
||||||
jne :clc
|
jne :clc
|
||||||
|
|
||||||
bit interseg
|
bit interseg
|
||||||
|
@ -2886,7 +2886,7 @@ relocatefinal
|
||||||
sta [tempptr],y
|
sta [tempptr],y
|
||||||
rep $20
|
rep $20
|
||||||
lda foundlable+o_labtype
|
lda foundlable+o_labtype
|
||||||
and #linkabsbit
|
and #linkabsbit.linkgeqbit
|
||||||
jne :clc
|
jne :clc
|
||||||
|
|
||||||
bit interseg
|
bit interseg
|
||||||
|
@ -3048,7 +3048,7 @@ relocatefinal
|
||||||
sta [tempptr],y
|
sta [tempptr],y
|
||||||
rep $20
|
rep $20
|
||||||
lda foundlable+o_labtype
|
lda foundlable+o_labtype
|
||||||
and #linkabsbit
|
and #linkabsbit.linkgeqbit
|
||||||
jne :clc
|
jne :clc
|
||||||
|
|
||||||
lda #$f5
|
lda #$f5
|
||||||
|
@ -3103,7 +3103,7 @@ relocatefinal
|
||||||
sta [tempptr],y
|
sta [tempptr],y
|
||||||
|
|
||||||
lda foundlable+o_labtype
|
lda foundlable+o_labtype
|
||||||
and #linkabsbit
|
and #linkabsbit.linkgeqbit
|
||||||
jne :clc
|
jne :clc
|
||||||
|
|
||||||
lda #$f5
|
lda #$f5
|
||||||
|
@ -3252,7 +3252,7 @@ getexternal php
|
||||||
ora #linkentused
|
ora #linkentused
|
||||||
sta [lableptr],y
|
sta [lableptr],y
|
||||||
:itsfound2 lda foundlable+o_labtype
|
:itsfound2 lda foundlable+o_labtype
|
||||||
bit #linkentrybit
|
bit #linkentrybit.linkgeqbit
|
||||||
jeq :notfound
|
jeq :notfound
|
||||||
lda foundlable+o_lablocal ;get lable's seg number
|
lda foundlable+o_lablocal ;get lable's seg number
|
||||||
sta extseg
|
sta extseg
|
||||||
|
|
18
testdata/3010-gequ-link.S
vendored
Normal file
18
testdata/3010-gequ-link.S
vendored
Normal file
|
@ -0,0 +1,18 @@
|
||||||
|
* link file
|
||||||
|
* link script gequ symbols are visible to both the assembler and linker
|
||||||
|
*
|
||||||
|
*
|
||||||
|
|
||||||
|
ovr all
|
||||||
|
* this geq available at asm-time
|
||||||
|
gequ1 geq 1
|
||||||
|
equ1 equ 2
|
||||||
|
|
||||||
|
asm 3010-gequ.S
|
||||||
|
* this geq available at link-time
|
||||||
|
gequ2 geq 3
|
||||||
|
|
||||||
|
lnk 3010-gequ.L
|
||||||
|
sav 3010-gequ
|
||||||
|
|
||||||
|
ent
|
22
testdata/3010-gequ.S
vendored
Normal file
22
testdata/3010-gequ.S
vendored
Normal file
|
@ -0,0 +1,22 @@
|
||||||
|
|
||||||
|
rel
|
||||||
|
xc
|
||||||
|
xc
|
||||||
|
|
||||||
|
|
||||||
|
* ext gequ1
|
||||||
|
ext gequ2
|
||||||
|
lda #gequ1
|
||||||
|
ldy #equ1
|
||||||
|
ldx #gequ2
|
||||||
|
rtl
|
||||||
|
|
||||||
|
* verify all sizes work
|
||||||
|
db gequ2
|
||||||
|
dw gequ2
|
||||||
|
ddb gequ2
|
||||||
|
adr gequ2
|
||||||
|
adrl gequ2
|
||||||
|
|
||||||
|
sav 3010-gequ.L
|
||||||
|
sym
|
Loading…
Reference in New Issue
Block a user