Browse Source

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.
pull/116/head
Virgil Dupras 4 years ago
parent
commit
838c88459b
4 changed files with 2 additions and 5 deletions
  1. +0
    -1
      blk/127
  2. +1
    -1
      blk/157
  3. +1
    -3
      blk/378
  4. BIN
      emul/forth.bin

+ 0
- 1
blk/127 View File

@@ -14,4 +14,3 @@





+ 1
- 1
blk/157 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! ;





+ 1
- 3
blk/378 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 ! ;



BIN
emul/forth.bin View File


Loading…
Cancel
Save