This commit is contained in:
~d6 2022-12-13 14:54:49 -05:00
parent e4f1e4982b
commit 924fffe205
1 changed files with 20 additions and 1 deletions

View File

@ -192,6 +192,10 @@
ROT ROT STH2r ( tag^ n* add* )
;make-obj JMP2 ( res$ )
@add-big-u16 ( x$ y* -> z$ )
STH2 ;read-object JSR ( xtag^ xhi* xlo* [y*] )
@sym-from-buf ( -> sym$ )
;buffer/input ;sym-from-buf-src JMP2
@ -545,7 +549,22 @@
&not-t DUP2 #8000 LTH2 ,&not-int JCN POP2 #30 JMP2r
&not-int DUP2 #6000 LTH2 ,&not-tal JCN POP2 #60 JMP2r
&not-tal DUP2 #4000 LTH2 ,&not-sym JCN POP2 #10 JMP2r
&not-sym ;read-object JSR2 POP2 POP2 #f0 AND JMP2r
&not-sym ;obj-to-addr JSR2 #f0 AND JMP2r
@is-short-int ( ref$ -> bool^ )
#7fff GTH JMP2r ( ref>7fff^ )
@is-long-int ( ref$ -> bool^ )
DUP2 #3fff GTH ,&nope ( ref$ )
;obj-to-addr JSR2 LDA ( tag^ )
#f7 AND #30 EQU JMP2r ( (tag^f7)==30^ )
&nope POP2 #00 JMP2r ( 00 )
@is-big-int ( ref$ -> bool^ )
DUP2 #3fff GTH ,&nope ( ref$ )
;obj-to-addr JSR2 LDA ( tag^ )
#f7 AND #34 EQU JMP2r ( (tag^f7)==34^ )
&nope POP2 #00 JMP2r ( 00 )
@assert-cons ( ref$ -> )
DUP2 #c000 AND2 ,&not-obj JCN ( ref$ )