(uxndis) Print labels in immediate jumps
This commit is contained in:
parent
7657ae08be
commit
23d293fb48
|
@ -26,8 +26,7 @@
|
||||||
&>l ( -- )
|
&>l ( -- )
|
||||||
<print-line>
|
<print-line>
|
||||||
INC2 GTH2k ?&>l
|
INC2 GTH2k ?&>l
|
||||||
POP2 POP2 #010e DEO
|
POP2 POP2 #800f DEO
|
||||||
#800f DEO
|
|
||||||
BRK }
|
BRK }
|
||||||
.Console/read DEI src/<append>
|
.Console/read DEI src/<append>
|
||||||
BRK
|
BRK
|
||||||
|
@ -52,6 +51,7 @@
|
||||||
.File/name DEO2
|
.File/name DEO2
|
||||||
#4000 .File/length DEO2
|
#4000 .File/length DEO2
|
||||||
;sym .File/read DEO2
|
;sym .File/read DEO2
|
||||||
|
.File/success DEI2 #0000 EQU2 ;find-sym/null STA
|
||||||
JMP2r
|
JMP2r
|
||||||
|
|
||||||
@<print-line> ( addr* -- addr* )
|
@<print-line> ( addr* -- addr* )
|
||||||
|
@ -99,8 +99,8 @@
|
||||||
<print-3-byte>
|
<print-3-byte>
|
||||||
LDAk #03 SFT #00 SWP ;opcodes/brk ADD2 <pstr>
|
LDAk #03 SFT #00 SWP ;opcodes/brk ADD2 <pstr>
|
||||||
#2018 DEO
|
#2018 DEO
|
||||||
INC2 LDA2k <print-rel>
|
DUP2 INC2k LDA2 <print-rel>
|
||||||
INC2 JMP2r }
|
INC2 INC2 JMP2r }
|
||||||
LDAk DUP #80 NEQ SWP #c0 NEQ AND ?{
|
LDAk DUP #80 NEQ SWP #c0 NEQ AND ?{
|
||||||
<print-2-byte>
|
<print-2-byte>
|
||||||
;opcodes <pstr>
|
;opcodes <pstr>
|
||||||
|
@ -125,11 +125,19 @@
|
||||||
[ LIT2 "r 18 ] DEO }
|
[ LIT2 "r 18 ] DEO }
|
||||||
JMP2r
|
JMP2r
|
||||||
|
|
||||||
@<print-rel> ( value* -- )
|
@<print-rel> ( addr* value* -- )
|
||||||
|
( | find sym )
|
||||||
|
SWP2 ;rom SUB2 #0103 ADD2 OVR2 ADD2 find-sym
|
||||||
|
( ) DUP2 #ffff NEQ2 ?<print-dst>
|
||||||
|
POP2
|
||||||
|
( | resume )
|
||||||
OVR #80 AND ?<pdec>
|
OVR #80 AND ?<pdec>
|
||||||
[ LIT2 "+ 18 ] DEO
|
[ LIT2 "+ 18 ] DEO
|
||||||
!<pdec>
|
!<pdec>
|
||||||
|
|
||||||
|
@<print-dst> ( addr* sym* -- )
|
||||||
|
NIP2 !<pstr>
|
||||||
|
|
||||||
@<print-pad> ( count -- )
|
@<print-pad> ( count -- )
|
||||||
#00
|
#00
|
||||||
&>l ( -- )
|
&>l ( -- )
|
||||||
|
@ -139,11 +147,12 @@
|
||||||
|
|
||||||
@find-sym ( addr* -- sym* )
|
@find-sym ( addr* -- sym* )
|
||||||
,&t STR2
|
,&t STR2
|
||||||
|
[ LIT &null 01 ] ?&skip
|
||||||
;sym
|
;sym
|
||||||
&>w ( -- )
|
&>w ( -- )
|
||||||
LDA2k [ LIT2 &t $2 ] NEQ2 ?{ INC2 INC2 JMP2r }
|
LDA2k [ LIT2 &t $2 ] NEQ2 ?{ INC2 INC2 JMP2r }
|
||||||
INC2 INC2 scap/ INC2 INC2k INC2 LDA ?&>w
|
INC2 INC2 scap/ INC2 INC2k INC2 LDA ?&>w
|
||||||
POP2 #ffff JMP2r
|
POP2 &skip #ffff JMP2r
|
||||||
|
|
||||||
(
|
(
|
||||||
@|stdlib )
|
@|stdlib )
|
||||||
|
|
Loading…
Reference in New Issue