1
0
mirror of https://github.com/hsoft/collapseos.git synced 2024-11-10 03:08:06 +11:00
collapseos/blk/374

15 lines
379 B
Plaintext
Raw Normal View History

: 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! ;