Thoughts on extending the code
We have looked at the inner loop and a few basic commands of a Forth system. We could extend this system on this level with more machine build words or hand-crafted higher-level routines. But what we actually want is tooling that eases the building of these words.
To be able to do that we need two more things:
- ways to handle a dictionary
- and a command line for input and output
We will implement the handling of the dicitionary first.
The dictionary is a linked list of words in the following format:
▲
│
┌──┴───┬───┬───┬───┬──────────────────---
│ LINK │ 2 │ s │ q │ (definition ...)
└──▲───┴───┴───┴───┴──────────────────---
│
LATEST
How to implement this will be described in future posts.