"Block Words + extensions"

block
Historically Forth was implemented on small computers as an
operating system in its own right. Mass storage was not
organized in files but as a sequence of 1 KB blocks. A block
was addressed with a block number. This way a diskette drive
provided a few hundred blocks and if you had a fixed disk
you simply had thousands of those blocks.

Both program text and arbitrary data can be stored in blocks.
In order to hold source text the 1K block is treated as
having 16 lines with 64 charactes each. This is often
referred to as a 'screen'.

When loading (i.e. interpreting) a block with source text it
is simply taking to be a single line of 1024 characters. The
only exception to this is the word \ (begin comment to
end of line) which skips text up to the end of a 64-char line
in a block.
Tektronix CTE %version: 5.5 % GNU LGPL
[ANS]
* BLK ( -- val )

the direct use of BLK and SCR is depracated
(very traditional variables for I/O system)

block threadstate variable

* BLOCK ( u -- addr )

load the specified block into a block buffer
and return the address of that block buffer
- see also BUFFER

block ordinary primitive

* BUFFER ( u -- addr )

get the block buffer address for the specified
block - if it had not been loaded already it
is not filled with data from the disk
unlike BLOCK does.

block ordinary primitive

* FLUSH ( -- )

call SAVE-BUFFERS and then unassign all
block buffers with EMPTY-BUFFERS

block ordinary primitive

* LOAD ( u -- )

INTERPRET the specified BLOCK

block ordinary primitive

* SAVE-BUFFERS ( -- )

write all modified buffer to
the disk, see UPDATE and
FLUSH

block ordinary primitive

* UPDATE ( -- )

mark the current block buffer as modified,
see FLUSH

block ordinary primitive

FXco ("EVALUATE", ...)
[ANS]
* EMPTY-BUFFERS ( -- )

unassign all block buffers, does not even UPDATE

block ordinary primitive

* LIST ( u -- )

display the block

block ordinary primitive

* SCR ( -- val )

the direct use of BLK and SCR is depracated
(very traditional variables for I/O system)

block threadstate variable

* THRU ( u1 u2 -- )

LOAD a number of block in sequence.

block ordinary primitive

FXco ("REFILL", ...)
FXco ("\\", ...)
ENVIRONMENT
enviroment hints (testing for -EXT will mark this wordset as present)
ENVIRONMENT BLOCK-EXT

no special info, see general notes

block ordinary constant