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