1
0
mirror of https://github.com/hsoft/collapseos.git synced 2024-11-23 16:28:05 +11:00

Make BLK@ FLUSH only if loading a different block

Otherwise, when editing a file with VE, we would constantly write
to disk, which is a bit inefficient.
This commit is contained in:
Virgil Dupras 2020-06-11 21:42:52 -04:00
parent e317e9cc78
commit 838c88459b
4 changed files with 2 additions and 5 deletions

View File

@ -14,4 +14,3 @@

View File

@ -1,7 +1,7 @@
: WIPE BLK( 1024 0 FILL BLK!! ;
( src dst -- )
: COPY SWAP BLK@ BLK> ! BLK! ;
: COPY FLUSH SWAP BLK@ BLK> ! BLK! ;

View File

@ -4,10 +4,8 @@
;
: FLUSH BLKDTY @ IF BLK! THEN ;
: BLK@ ( n -- )
FLUSH
DUP BLK> @ = IF DROP EXIT THEN
DUP BLK> ! BLK@* @ EXECUTE
;
FLUSH DUP BLK> ! BLK@* @ EXECUTE ;
: BLK!! 1 BLKDTY ! ;

Binary file not shown.