Stopped using relative offsets in sublabels
This commit is contained in:
parent
300f3dfa75
commit
e27bde2879
|
@ -149,7 +149,6 @@
|
||||||
#0000 ;asma/error STA2
|
#0000 ;asma/error STA2
|
||||||
;asma-heap ;asma/heap STA2
|
;asma-heap ;asma/heap STA2
|
||||||
#0000 ;asma-trees/labels STA2
|
#0000 ;asma-trees/labels STA2
|
||||||
( FIXME should walk the label tree and remove any in the heap )
|
|
||||||
;asma-opcodes/_entry ;asma-trees/opcodes STA2
|
;asma-opcodes/_entry ;asma-trees/opcodes STA2
|
||||||
#0000 ;asma-trees/macros STA2
|
#0000 ;asma-trees/macros STA2
|
||||||
|
|
||||||
|
@ -192,7 +191,7 @@
|
||||||
POP POP2 POP2
|
POP POP2 POP2
|
||||||
JMP2r
|
JMP2r
|
||||||
|
|
||||||
@asma [ &pass $1 &state $1 &line $2 &token $2 &orig-token $2 &heap $2 &addr $2 &written-addr $2 &flush-fn $2 &scope-addr $2 &error $2 ]
|
@asma [ &pass $1 &state $1 &line $2 &token $2 &orig-token $2 &heap $2 &addr $2 &written-addr $2 &flush-fn $2 &error $2 ]
|
||||||
@asma-trees [ &labels $2 ¯os $2 &opcodes $2 &scope $2 ]
|
@asma-trees [ &labels $2 ¯os $2 &opcodes $2 &scope $2 ]
|
||||||
|
|
||||||
(
|
(
|
||||||
|
@ -500,14 +499,12 @@
|
||||||
JMP2r
|
JMP2r
|
||||||
|
|
||||||
@asma-label-define
|
@asma-label-define
|
||||||
#0000 ;asma/scope-addr STA2
|
|
||||||
;asma-trees/labels ,asma-label-helper JSR
|
;asma-trees/labels ,asma-label-helper JSR
|
||||||
,&already-existed JCN
|
,&already-existed JCN
|
||||||
|
|
||||||
#0000 ;asma-append-heap-short JSR2 ( data2: subtree incoming ptr )
|
#0000 ;asma-append-heap-short JSR2 ( data2: subtree incoming ptr )
|
||||||
|
|
||||||
&already-existed
|
&already-existed
|
||||||
;asma/addr LDA2 ;asma/scope-addr STA2
|
|
||||||
#0002 ADD2 ;asma-trees/scope STA2
|
#0002 ADD2 ;asma-trees/scope STA2
|
||||||
JMP2r
|
JMP2r
|
||||||
|
|
||||||
|
@ -534,8 +531,7 @@
|
||||||
|
|
||||||
;asma/heap LDA2
|
;asma/heap LDA2
|
||||||
|
|
||||||
;asma/addr LDA2 ;asma/scope-addr LDA2 SUB2
|
;asma/addr LDA2 ;asma-append-heap-short JSR2 ( data1: address )
|
||||||
;asma-append-heap-short JSR2 ( data1: address )
|
|
||||||
#00 JMP2r
|
#00 JMP2r
|
||||||
|
|
||||||
@asma-pad-absolute
|
@asma-pad-absolute
|
||||||
|
@ -614,14 +610,14 @@
|
||||||
@asma-addr-helper ( -- addr* )
|
@asma-addr-helper ( -- addr* )
|
||||||
;asma/token LDA2 LDAk #26 NEQ ,¬-local JCN
|
;asma/token LDA2 LDAk #26 NEQ ,¬-local JCN
|
||||||
#0001 ADD2 ;asma/token STA2
|
#0001 ADD2 ;asma/token STA2
|
||||||
;asma/scope-addr LDA2 ;asma-trees/scope LDA2
|
;asma-trees/scope LDA2
|
||||||
,&final-lookup JMP
|
,&final-lookup JMP
|
||||||
|
|
||||||
¬-local ( token* )
|
¬-local ( token* )
|
||||||
LDAk
|
LDAk
|
||||||
DUP ,¬-end JCN
|
DUP ,¬-end JCN
|
||||||
POP POP2
|
POP POP2
|
||||||
#0000 ;asma-trees/labels
|
;asma-trees/labels
|
||||||
,&final-lookup JMP
|
,&final-lookup JMP
|
||||||
|
|
||||||
¬-end ( token* char )
|
¬-end ( token* char )
|
||||||
|
@ -633,23 +629,26 @@
|
||||||
DUP2 #00 ROT ROT STA
|
DUP2 #00 ROT ROT STA
|
||||||
;asma-trees/labels ;asma-traverse-tree JSR2 STH
|
;asma-trees/labels ;asma-traverse-tree JSR2 STH
|
||||||
SWP2 DUP2 #2f ROT ROT STA
|
SWP2 DUP2 #2f ROT ROT STA
|
||||||
STHr ,¬-found JCN
|
STHr ,¬-found2 JCN
|
||||||
( token* binary-ptr* )
|
( token* binary-ptr* )
|
||||||
#0001 ADD2 ;asma/token STA2
|
#0001 ADD2 ;asma/token STA2
|
||||||
LDA2k SWP2 #0002 ADD2
|
#0002 ADD2
|
||||||
|
|
||||||
&final-lookup ( addr-offset* incoming-ptr* )
|
&final-lookup ( addr-offset* incoming-ptr* )
|
||||||
;asma-traverse-tree JSR2 ,¬-found JCN
|
;asma-traverse-tree JSR2
|
||||||
LDA2 ADD2
|
,¬-found JCN
|
||||||
|
LDA2
|
||||||
JMP2r
|
JMP2r
|
||||||
|
|
||||||
¬-found ( dummy* dummy* )
|
¬-found2 ( dummy* dummy* )
|
||||||
|
POP2
|
||||||
|
¬-found ( dummy* )
|
||||||
|
POP2
|
||||||
|
|
||||||
;asma/pass LDA #00 EQU ,&ignore-error JCN
|
;asma/pass LDA #00 EQU ,&ignore-error JCN
|
||||||
;asma-msg-label ;asma/error STA2
|
;asma-msg-label ;asma/error STA2
|
||||||
&ignore-error
|
&ignore-error
|
||||||
|
|
||||||
POP2 POP2
|
|
||||||
;asma/addr LDA2
|
;asma/addr LDA2
|
||||||
JMP2r
|
JMP2r
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue