fix bugs
This commit is contained in:
parent
ae8af3c309
commit
c81b6906c6
6
hoax.tal
6
hoax.tal
|
@ -164,7 +164,7 @@
|
|||
( addition of the given 16-bit integer. )
|
||||
( the sign of the 16-bit integer to add is assumed )
|
||||
( to be the same as the original number. )
|
||||
@shift-and-add ( num$ $add -> res$ )
|
||||
@shift-and-add ( num$ add* -> res$ )
|
||||
STH2 ( num$ [add*] )
|
||||
DUP2 #8000 EQU2 ,&iszero JCN ( num$ [add*] )
|
||||
DUP2 #7fff GTH2 ,&literal JCN ( num$ )
|
||||
|
@ -182,9 +182,9 @@
|
|||
;make-obj JMP2 ( res$ )
|
||||
&literal ( num$ [add*] )
|
||||
#7fff AND2 ( n* [add*] )
|
||||
DUP2 #4000 GTH2 ,&negative JCN ( n* [add*] )
|
||||
DUP2 #3fff GTH2 ,&negative JCN ( n* [add*] )
|
||||
#30 ,&create JMP ( n* 30 [add*] )
|
||||
&iszero JMP2r ( zero$ [add*] )
|
||||
&iszero STH2r ;u16-to-num JMP2 ( res$ )
|
||||
&error POP POP2 ;error JMP2 ( <ERROR> )
|
||||
&negative ( n* [add*] )
|
||||
#8000 SWP2 SUB2 #38 ( abs* 38 [add*] )
|
||||
|
|
Loading…
Reference in New Issue