Browse Source

Add extra words WIPED? and FREEBLKS?

pull/128/head
Virgil Dupras 3 years ago
parent
commit
7eeec67ff5
2 changed files with 9 additions and 17 deletions
  1. +2
    -2
      blk/064
  2. +7
    -15
      blk/157

+ 2
- 2
blk/064 View File

@@ -5,6 +5,7 @@ BLK( -- a Beginning addr of blk buf.
BLK) -- a Ending addr of blk buf.
COPY s d -- Copy contents of s block to d block.
FLUSH -- Write current block to disk if dirty.
FREEBLKS? a b -- List free blocks between blocks a and b.
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
@@ -12,5 +13,4 @@ LOAD+ n -- Relative load. Loads active block + n.
LOADR n1 n2 -- Load block range between n1 and n2, inclusive.
LOADR+ n1 n2 -- Relative ranged load.
WIPE -- Empties current block


WIPED? -- f Whether current block is empty

+ 7
- 15
blk/157 View File

@@ -1,16 +1,8 @@
: WIPE BLK( 1024 0 FILL BLK!! ;

( src dst -- )
: COPY FLUSH SWAP BLK@ BLK> ! BLK! ;












: WIPED? ( -- f )
1 ( f ) BLK) BLK( DO
I C@ IF DROP 0 ( f ) LEAVE THEN LOOP ;
: COPY ( src dst -- )
FLUSH SWAP BLK@ BLK> ! BLK! ;
: FREEBLKS? ( b1 b2 -- )
1+ SWAP DO I BLK@ WIPED? IF I . SPC THEN LOOP ;

Loading…
Cancel
Save