Pre-parsed words

Text is stored as 32-bit words, with possible extension words
bits31..........................43..0functioncolor
characters0extension
1executeyellow
3definered
4compilegreen
7compilecyan
9commentwhite
aCapitalizedwhite
ball capswhite
cvariablemagenta

Numbers have a bit for display format (decimal/hex). Those that fit in 27 bits (with sign extend) are stored
bits31.........................543..0functioncolor
numberhex8executeyellow
6compilegreen

Larger numbers require 2 32-bit words
bits31.........................543..0functioncolor
hex2executeyellow
5compilegreen
bits31..............................0
number

Functions

A red word is defined: its name (1st word only) is placed in the next entry of a table of names. The current location in the dictionary is placed in a parallel table of locations. The name table will be searched backwards (from most recent to earliest). If a word is not found, a ? is displayed and the Editor points at the word in the source code.

A yellow word is executed. Which means that the code it points to is called. Upon return, the Data stack may be different. A yellow number is pushed onto the Data stack.

The word 'forth' selects the main dictionary. The word 'macro' selects another dictionary. Red words will now be defined here. A green word causes this to be searched. If found here, it is executed and presumably compiles some code. Otherwise the forth dictionary is searched and a call to the word's location is compiled. A green number compiles code that pushes it onto the Data stack.

If a macro is cyan it is compiled, not executed. This allows nesting macros. An ordinary word could be cyan, but this is unnecessary and confusing. Should a macro be yellow, it will not be found.

Yellow words within a definition will be executed, as expected. However, they should leave a (single) number on the stack. The transition from yellow to green words causes this number to be compiled. Thus numbers can be calculated inside definitions, which helps understand where they came from.

A magenta word defines a variable. Its code is shared with other variables. The next word in the dictionary is used to point back to the source code, where the value of the variable is stored (initially 0). A yellow variable pushes its address onto the Data stack.

The value of a variable is not disturbed by recompilation. It is saved with the source code and restored with the next boot. Its value is displayed by the Editor. These variables have the flavor of 'state variables'. Temporary variables are usually held on the stack.

On the Pentium, yellow variables are preferred. At compile time, their address is returned and will be compiled as a literal at the yellow-green transition. (Remember, only 1 number is compiled per yellow-green transition.) A green variable compiles a call to code executed at run time to put the address on the stack.