more wip
This commit is contained in:
parent
e4f1e4982b
commit
924fffe205
21
hoax.tal
21
hoax.tal
|
@ -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 @@
|
|||
¬-t DUP2 #8000 LTH2 ,¬-int JCN POP2 #30 JMP2r
|
||||
¬-int DUP2 #6000 LTH2 ,¬-tal JCN POP2 #60 JMP2r
|
||||
¬-tal DUP2 #4000 LTH2 ,¬-sym JCN POP2 #10 JMP2r
|
||||
¬-sym ;read-object JSR2 POP2 POP2 #f0 AND JMP2r
|
||||
¬-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 ,¬-obj JCN ( ref$ )
|
||||
|
|
Loading…
Reference in New Issue