From 7cfcd0e2b01d2ba17c3007375b2077f0738b1f71 Mon Sep 17 00:00:00 2001 From: Jonas Hvid Date: Mon, 18 Nov 2019 18:47:55 +0100 Subject: [PATCH] Add list of built-in variables --- notes.md | 8 ++++++++ 1 file changed, 8 insertions(+) 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. -- 2.39.2