From: Jonas Hvid Date: Mon, 18 Nov 2019 17:47:55 +0000 (+0100) Subject: Add list of built-in variables X-Git-Url: https://git.rrq.au/?a=commitdiff_plain;h=7cfcd0e2b01d2ba17c3007375b2077f0738b1f71;p=rrq%2Fjonasforth.git Add list of built-in variables --- 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.