X-Git-Url: https://git.rrq.au/?a=blobdiff_plain;f=notes.md;h=f82824cca8d56bf183689c237762aefc1be41c88;hb=7cfcd0e2b01d2ba17c3007375b2077f0738b1f71;hp=7788c33ff7e5228f3bc7e7d73dda2f531d886955;hpb=0f1b460bd08ae1d2d9bc3dafa3c30cd08d95338e;p=rrq%2Fjonasforth.git diff --git a/notes.md b/notes.md index 7788c33..f82824c 100644 --- a/notes.md +++ b/notes.md @@ -101,3 +101,11 @@ Literals are handled in a special way. There is a word in Forth, called LIT, implemented in assembly. When executed, this word looks at the next Forth instruction (i.e. the value of ESI), and places that on the stack as a literal, and then manipulates ESI to skip over the literal value. + +## Built-in variables + +* **STATE** -- Is the interpreter executing code (0) or compiling a word (non-zero)? +* **LATEST** -- Points to the latest (most recently defined) word in the dictionary. +* **HERE** -- Points to the next free byte of memory. When compiling, compiled words go here. +* **S0** -- Stores the address of the top of the parameter stack. +* **BASE** -- The current base for printing and reading numbers.