mirror of
https://github.com/hsoft/collapseos.git
synced 2024-11-23 22:58:06 +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:
parent
e317e9cc78
commit
838c88459b
2
blk/157
2
blk/157
@ -1,7 +1,7 @@
|
|||||||
: WIPE BLK( 1024 0 FILL BLK!! ;
|
: WIPE BLK( 1024 0 FILL BLK!! ;
|
||||||
|
|
||||||
( src dst -- )
|
( src dst -- )
|
||||||
: COPY SWAP BLK@ BLK> ! BLK! ;
|
: COPY FLUSH SWAP BLK@ BLK> ! BLK! ;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
4
blk/378
4
blk/378
@ -4,10 +4,8 @@
|
|||||||
;
|
;
|
||||||
: FLUSH BLKDTY @ IF BLK! THEN ;
|
: FLUSH BLKDTY @ IF BLK! THEN ;
|
||||||
: BLK@ ( n -- )
|
: BLK@ ( n -- )
|
||||||
FLUSH
|
|
||||||
DUP BLK> @ = IF DROP EXIT THEN
|
DUP BLK> @ = IF DROP EXIT THEN
|
||||||
DUP BLK> ! BLK@* @ EXECUTE
|
FLUSH DUP BLK> ! BLK@* @ EXECUTE ;
|
||||||
;
|
|
||||||
|
|
||||||
: BLK!! 1 BLKDTY ! ;
|
: BLK!! 1 BLKDTY ! ;
|
||||||
|
|
||||||
|
BIN
emul/forth.bin
BIN
emul/forth.bin
Binary file not shown.
Loading…
Reference in New Issue
Block a user