1
0
mirror of https://github.com/hsoft/collapseos.git synced 2024-11-01 21:30:55 +11:00
collapseos/cvm/forth.fs
Virgil Dupras d09de0a0d3 Integrate RDLN input buffer into sysvars
In the beginning of Collapse OS' Forth version, the readline sub-
system was optional. This is why we had this separate RDLN$ routine
and that the input buffer was allocated at boot time.

It's been a while since the RDLN system has been made mandatory, but
we still paid the complexity tax of this separation. Not anymore.
2021-01-02 14:32:03 -05:00

16 lines
355 B
Forth

: COLS 80 ; : LINES 32 ;
: CURSOR! ( new old -- )
DROP COLS /MOD 6 PC! ( y ) 5 PC! ( x ) ;
: CELL! ( c pos -- ) 0 CURSOR! 0 PC! ;
SYSVARS 0xa0 + CONSTANT GRID_MEM
402 403 LOADR ( Grid )
390 LOAD ( xcomp core high )
(entry) _
( Update LATEST )
PC ORG @ 8 + !
," BLK$ ' EFS@ BLK@* ! ' EFS! BLK!* ! GRID$ " EOT,
ORG @ |M 2 PC! 2 PC!
H@ |M 2 PC! 2 PC!