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-25 20:34:52 -04:00
|
|
|
: _wb 0x0e RAM+ ;
|
|
|
|
: _eot 0x0401 _wb ! _wb ;
|
2020-05-02 21:21:47 -04:00
|
|
|
: WORD
|
2020-05-25 20:34:52 -04:00
|
|
|
_wb 1+ TOWORD ( a c )
|
|
|
|
DUP EOT? IF 2DROP _eot EXIT THEN
|
2020-05-02 21:21:47 -04:00
|
|
|
BEGIN
|
2020-05-25 20:34:52 -04:00
|
|
|
OVER C! 1+ C< ( a c )
|
|
|
|
OVER 0x2e RAM+ = OVER WS? OR
|
2020-05-13 21:44:46 -04:00
|
|
|
UNTIL ( a c )
|
2020-05-25 20:34:52 -04:00
|
|
|
SWAP _wb - 1- ( ws len ) _wb C!
|
|
|
|
EOT? IF _eot ELSE _wb THEN ;
|
2020-06-11 18:12:01 -04:00
|
|
|
|
|
|
|
|
|
|
|
|