From 838c88459b16e8f48b50049d83171b907dc0b396 Mon Sep 17 00:00:00 2001 From: Virgil Dupras Date: Thu, 11 Jun 2020 21:42:52 -0400 Subject: [PATCH] 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. --- blk/127 | 1 - blk/157 | 2 +- blk/378 | 4 +--- emul/forth.bin | Bin 6187 -> 6187 bytes 4 files changed, 2 insertions(+), 5 deletions(-) diff --git a/blk/127 b/blk/127 index d389a87..c593a01 100644 --- a/blk/127 +++ b/blk/127 @@ -14,4 +14,3 @@ - diff --git a/blk/157 b/blk/157 index f4c6b9f..a9e14d2 100644 --- a/blk/157 +++ b/blk/157 @@ -1,7 +1,7 @@ : WIPE BLK( 1024 0 FILL BLK!! ; ( src dst -- ) -: COPY SWAP BLK@ BLK> ! BLK! ; +: COPY FLUSH SWAP BLK@ BLK> ! BLK! ; diff --git a/blk/378 b/blk/378 index 97ae670..5333eb6 100644 --- a/blk/378 +++ b/blk/378 @@ -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 ! ; diff --git a/emul/forth.bin b/emul/forth.bin index cc5e85104f12d8a0329f130cfcf1bc1e0a5d8a7f..9b8f0873456c8da8d718b8cad786385863e1eb9e 100644 GIT binary patch delta 31 ncmZ2&u-ah5LO!A2jLdu!m?PQJ8Q2&UnVcAU_%?6mtKb9xm+}aR delta 31 ncmZ2&u-ah5LO!7$zTb?@d=r=>+0q%<7!;YD7&dR_tKb9xoA3yT