mirror of
https://github.com/hsoft/collapseos.git
synced 2024-11-05 21:30:56 +11:00
a348ee9106
The few extra bytes they save in the core aren't worth the extra complexity. This was initially done in a context where I had troubles keeping the RC2014 binary with SDC inside the 8K limit. At this point, even with the few extra bytes we add here, we're at 7200 bytes, so I'd say we're fine.
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! ;
|