Mirror of CollapseOS
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

17 lines
702B

  1. Interpreter I/O
  2. The INTERPRET loop, the heart of Collapse OS, feeds itself
  3. from the C< word, which yields a character every time it is
  4. called. If no character is available to interpret, it blocks.
  5. During normal operations, C< is simply a buffered layer over
  6. KEY, which has the same behavior (but unbuffered). Before
  7. yielding any character, the C< routine fetches a whole line
  8. from KEY, puts it in a buffer, then yields the buffered line,
  9. one character at once.
  10. Both C< and KEY can be overridden by setting an alternate
  11. routine at the proper RAM offset (see B80). For example, C<
  12. overrides are used during LOAD so that input comes from
  13. disk blocks instead of keyboard. (cont.)