collapseos/apps/forth
Virgil Dupras 03e529b762 forth: simplify execution model and handle literals better
This scheme of "when we handle line-by-line, compile one word at a time then
execute" so that we could allow words like "CREATE" to call "readword" before
continuing was a bad scheme. It made things like branching outside of a colon
definition impossible.

This commit implement a new "litWord". When an undefined word is encountered at
compile time, it is included as-is in a string literal word. It is at run time
that we decide what to do with it.
2020-03-09 14:14:26 -04:00
..
README.md apps/forth: new (WIP) application 2020-03-07 12:13:15 -05:00
dict.asm forth: simplify execution model and handle literals better 2020-03-09 14:14:26 -04:00
dictionary.txt forth: simplify execution model and handle literals better 2020-03-09 14:14:26 -04:00
glue.asm forth: add number literals support 2020-03-07 19:25:55 -05:00
main.asm forth: simplify execution model and handle literals better 2020-03-09 14:14:26 -04:00
stack.asm forth: simplify execution model and handle literals better 2020-03-09 14:14:26 -04:00
util.asm forth: simplify execution model and handle literals better 2020-03-09 14:14:26 -04:00

README.md

Forth

WIP A Forth interpreter. Far from complete, but you can do stuff like

KEY EMIT KEY EMIT

See dictionary.txt for a word reference.