fixed bug

This commit is contained in:
~d6 2022-12-08 21:09:29 -05:00
parent 8cafcb7415
commit 067d2f719e
1 changed files with 12 additions and 13 deletions

View File

@ -114,6 +114,9 @@
( DEBUG EXIT )
BRK
@sym-from-buf ( -> sym$ )
;buffer/input ;sym-from-buf-src JMP2
@sym-from-buf-src ( src* -> sym$ )
;buffer/pos LDA2 STH2k ( src* limit* [limit*] )
OVR2 SUB2 ( src* size* [limit*] )
@ -138,19 +141,15 @@
POP2 POP2 POP2r STH2r ( new* )
;addr-to-obj JSR2 JMP2r ( new$ )
@sym-from-buf ( -> sym$ )
;buffer/input ;sym-from-buf-src JMP2
( TODO: fix bug with len > 4 )
@convert-sym-to-str ( sym$ -> )
;obj-to-addr JSR2 STH2k ( addr* [addr*] )
LDA DUP #30 EOR ( old^ new^ [addr*] )
STH2kr STA ( old^ [addr*] ; addr<-new )
#15 LTH ,&done JCN ( [addr*] )
STH2r INC2 INC2 INC2 LDA ( child$ )
;convert-sym-to-str JMP2 ( )
&done ( [addr*] )
POP2r JMP2r ( )
;obj-to-addr JSR2 STH2k ( addr* [addr*] )
LDA DUP #30 EOR ( old^ new^ [addr*] )
STH2kr STA ( old^ [addr*] ; addr<-new )
#15 LTH ,&done JCN ( [addr*] )
STH2r INC2 INC2 INC2 LDA2 ( child$ )
;convert-sym-to-str JMP2 ( )
&done ( [addr*] )
POP2r JMP2r ( )
@buf-end ( -> )
#00 ;buffer/pos LDA2 STA ( ; addr<-00 )
@ -293,7 +292,7 @@
( usage: ;echo JSR2 "literal-string 00 <rest-of-code> )
@echo ( -> )
LDArk STHr DUP #18 DEO
LDAkr STHr DUP #18 DEO
INC2r ,echo JCN JMP2r
@init-hoax ( -> )