2020-05-02 21:21:47 -04:00
|
|
|
( Read word from C<, copy to WORDBUF, null-terminate, and
|
2020-05-13 20:39:53 -04:00
|
|
|
return WORDBUF. )
|
2020-05-02 21:21:47 -04:00
|
|
|
: 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 )
|
2020-05-13 20:39:53 -04:00
|
|
|
OVER 0x2d ( 2e-1 for NULL ) RAM+ = OVER WS? OR
|
2020-05-02 21:21:47 -04:00
|
|
|
UNTIL
|
|
|
|
( a this point, PS is: a WS )
|
|
|
|
( null-termination is already written )
|
|
|
|
2DROP
|
|
|
|
0x0e RAM+ ;
|