collapseos/blk/406

17 lines
509 B
Plaintext
Raw Normal View History

( Read word from C<, copy to WORDBUF, null-terminate, and
return WORDBUF. )
: WORD
0x0e RAM+ ( 0e == WORDBUF )
TOWORD ( a c )
BEGIN
( We take advantage of the fact that char MSB is
always zero to pre-write our null-termination )
OVER ! 1+ ( a+1 )
C< ( a c )
OVER 0x2d ( 2e-1 for NULL ) RAM+ = OVER WS? OR
UNTIL
( a this point, PS is: a WS )
( null-termination is already written )
2DROP
0x0e RAM+ ;