mirror of
https://github.com/hsoft/collapseos.git
synced 2024-11-16 19:38: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.
15 lines
379 B
Plaintext
15 lines
379 B
Plaintext
: BLK! ( -- )
|
|
BLK> @ BLK!* @ EXECUTE
|
|
0 BLKDTY ! ;
|
|
: FLUSH BLKDTY @ IF BLK! THEN ;
|
|
: BLK@ ( n -- )
|
|
DUP BLK> @ = IF DROP EXIT THEN
|
|
FLUSH DUP BLK> ! BLK@* @ EXECUTE ;
|
|
: BLK!! 1 BLKDTY ! ;
|
|
: WIPE BLK( 1024 0 FILL BLK!! ;
|
|
: WIPED? ( -- f )
|
|
1 ( f ) BLK) BLK( DO
|
|
I C@ IF DROP 0 ( f ) LEAVE THEN LOOP ;
|
|
: COPY ( src dst -- )
|
|
FLUSH SWAP BLK@ BLK> ! BLK! ;
|