2020-05-04 09:24:41 +10:00
|
|
|
Interpreter I/O
|
2020-04-15 00:04:09 +10:00
|
|
|
|
2020-05-04 09:24:41 +10:00
|
|
|
The INTERPRET loop, the heart of Collapse OS, feeds itself
|
|
|
|
from the C< word, which yields a character every time it is
|
|
|
|
called. If no character is available to interpret, it blocks.
|
2020-04-15 00:04:09 +10:00
|
|
|
|
2020-05-04 09:24:41 +10:00
|
|
|
During normal operations, C< is simply a buffered layer over
|
|
|
|
KEY, which has the same behavior (but unbuffered). Before
|
|
|
|
yielding any character, the C< routine fetches a whole line
|
|
|
|
from KEY, puts it in a buffer, then yields the buffered line,
|
|
|
|
one character at once.
|
2020-04-15 00:04:09 +10:00
|
|
|
|
2020-05-04 09:24:41 +10:00
|
|
|
Both C< and KEY can be overridden by setting an alternate
|
|
|
|
routine at the proper RAM offset (see B80). For example, C<
|
|
|
|
overrides are used during LOAD so that input comes from
|
|
|
|
disk blocks instead of keyboard. (cont.)
|