From 0cf26547ffe3f33f3a77ddd84ceae87f4986a224 Mon Sep 17 00:00:00 2001 From: Virgil Dupras Date: Wed, 29 Apr 2020 20:21:18 -0400 Subject: [PATCH] Add words FLUSH and COPY --- blk/064 | 2 ++ blk/466 | 4 ++-- blk/470 | 3 +++ emul/forth.bin | Bin 5929 -> 5962 bytes 4 files changed, 7 insertions(+), 2 deletions(-) diff --git a/blk/064 b/blk/064 index 28752d4..abad1c3 100644 --- a/blk/064 +++ b/blk/064 @@ -1,6 +1,8 @@ Disk BLK> -- a Address of the current block variable. +COPY s d -- Copy contents of s block to d block. +FLUSH -- Write current block to disk if dirty. LIST n -- Prints the contents of the block n on screen in the form of 16 lines of 64 columns. LOAD n -- Interprets Forth code from block n diff --git a/blk/466 b/blk/466 index d7b688a..6b1063e 100644 --- a/blk/466 +++ b/blk/466 @@ -2,10 +2,10 @@ BLK> @ BLK!* @ EXECUTE 0 BLKDTY ! ; - +: FLUSH BLKDTY @ IF BLK! THEN ; : BLK@ ( n -- ) + FLUSH DUP BLK> @ = IF DROP EXIT THEN - BLKDTY @ IF BLK! THEN DUP BLK> ! BLK@* @ EXECUTE ; diff --git a/blk/470 b/blk/470 index ebbcb7e..63dcc04 100644 --- a/blk/470 +++ b/blk/470 @@ -2,3 +2,6 @@ : LOADR 1+ SWAP DO I DUP . CRLF LOAD LOOP ; : WIPE BLK( 1024 0 FILL BLK!! ; + +( src dst -- ) +: COPY SWAP BLK@ BLK> ! BLK! ; diff --git a/emul/forth.bin b/emul/forth.bin index c2de2e47ae6a1ab4815de789e6c6299543061774..2b950d399bc892d9010d87770cb8243f710adeaa 100644 GIT binary patch delta 194 zcmZ3fcS?`*@JxooyBHW4yf$*46LEI)2@Up;U|{8|5aDM|XJBDCBI3m0^zMDJrT><`vZz{w$)vAi&_ovYl}f^CaeE z<^mS2$=;$F{GUZSfHHav8(97`sW8+}J|t?-_<1sum;vML$;M*JvNEDh49@-mk-|Xh kwljVf0T~Z+f~#AwgW%+NvFV&mV(vgO6^3Jz|BGn>0BLtJG5`Po delta 161 zcmX@5w^EPu@JxooyBHW4G&gdd6ESo0@pcerVBwp^m?px{oXDEaz{aqe(TSk~$V+En zVK^cJlKIc%4&+w>#ewP-74;@diE0bq6H#CgVDMtu&NzvA5_2+h0gLS92+<7wdmXvJ7qw@+H<@3|fU$3~gP1ZWzo-*~t6Q*x@Z<)u>70pT?m**J7?w^} H5Z3|#rEMrV