mirror of
https://github.com/hsoft/collapseos.git
synced 2024-11-17 06:18:06 +11:00
44403c3d4c
The way is clear for complete stage1 bootstrapping on the RC2014 target!
17 lines
488 B
Plaintext
17 lines
488 B
Plaintext
( Read word from C<, copy to WORDBUF, null-terminate, and
|
|
return, make HL point to 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 )
|
|
DUP WS?
|
|
UNTIL
|
|
( a this point, PS is: a WS )
|
|
( null-termination is already written )
|
|
2DROP
|
|
0x0e RAM+ ;
|