Mirror of CollapseOS
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

17 lines
488B

  1. ( Read word from C<, copy to WORDBUF, null-terminate, and
  2. return, make HL point to WORDBUF. )
  3. : WORD
  4. 0x0e RAM+ ( 0e == WORDBUF )
  5. TOWORD ( a c )
  6. BEGIN
  7. ( We take advantage of the fact that char MSB is
  8. always zero to pre-write our null-termination )
  9. OVER ! 1+ ( a+1 )
  10. C< ( a c )
  11. DUP WS?
  12. UNTIL
  13. ( a this point, PS is: a WS )
  14. ( null-termination is already written )
  15. 2DROP
  16. 0x0e RAM+ ;