mirror of
https://github.com/hsoft/collapseos.git
synced 2024-11-17 05:08:05 +11:00
Add words FLUSH and COPY
This commit is contained in:
parent
581f04a4bc
commit
0cf26547ff
2
blk/064
2
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
|
||||
|
4
blk/466
4
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
|
||||
;
|
||||
|
||||
|
3
blk/470
3
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! ;
|
||||
|
BIN
emul/forth.bin
BIN
emul/forth.bin
Binary file not shown.
Loading…
Reference in New Issue
Block a user