mirror of
https://github.com/hsoft/collapseos.git
synced 2024-12-27 04:28:06 +11:00
705d68deec
With KEY and EMIT being switch words, most of the high layer can be defined before drivers. In addition to this change, I've compacted core blocks which were becoming quite sparse.
17 lines
427 B
Plaintext
17 lines
427 B
Plaintext
( Read one line in input buffer and make IN> point to it )
|
|
: (rdln)
|
|
( EOT or less triggers line flush )
|
|
(infl) BEGIN (rdlnc) 5 < UNTIL
|
|
LF IN( IN> ! ;
|
|
( And finally, implement C<* )
|
|
: RDLN<
|
|
IN> @ C@
|
|
DUP IF ( not EOL? good, inc and return )
|
|
1 IN> +!
|
|
ELSE ( EOL ? readline. we still return null though )
|
|
(rdln)
|
|
THEN
|
|
( update C<? flag )
|
|
IN> @ C@ 0 > 0x06 RAM+ ! ( 06 == C<? )
|
|
;
|