1 Using block files
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 16 lines with 64
characters each. This is called a ‘screen’ sometimes.
When loading (i.e. interpreting) a block with source text it appears as
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 line in a block.
1.1 Blocks in files
1.2 Words to handle blocks
1.3 Words to load source from blocks
1.4 Editing blocks
About This Document
This document was generated on November 5, 2024 using texi2html 5.0.
The buttons in the navigation panels have the following meaning:
Button |
Name |
Go to |
From 1.2.3 go to |
[ << ] |
FastBack |
Beginning of this chapter or previous chapter |
1 |
[ < ] |
Back |
Previous section in reading order |
1.2.2 |
[ Up ] |
Up |
Up section |
1.2 |
[ > ] |
Forward |
Next section in reading order |
1.2.4 |
[ >> ] |
FastForward |
Next chapter |
2 |
[Top] |
Top |
Cover (top) of document |
|
[Contents] |
Contents |
Table of contents |
|
[Index] |
Index |
Index |
|
[ ? ] |
About |
About (help) |
|
where the Example assumes that the current position is at Subsubsection One-Two-Three of a document of the following structure:
- 1. Section One
- 1.1 Subsection One-One
- 1.2 Subsection One-Two
- 1.2.1 Subsubsection One-Two-One
- 1.2.2 Subsubsection One-Two-Two
- 1.2.3 Subsubsection One-Two-Three
<== Current Position
- 1.2.4 Subsubsection One-Two-Four
- 1.3 Subsection One-Three
- 1.4 Subsection One-Four
This document was generated on November 5, 2024 using texi2html 5.0.