FnixForth

FnixForth (pronounced 'phoenix forth') is an x86 ColorForth variant for Linux (32 bit).
Download here: fnix.tar.gz
Use vim with the syntax script fnix.vim to edit the source colorfully.
The language design, colors, and spirit of FnixForth derive from Chuck Moore's ColorForth (thanks be to the discoverer of Forth!)
But since FnixForth was coded from scratch, any failings it may have are entirely my fault.
Differences (but not every difference) of FnixForth from ColorForth include:
A fnix executable starts with the ELF header and the machine code for the 7 colors and 15 words below.
The parameter stack is maintained by the bp register with ax holding the top parameter.
Execution begins with the fnix word.

Current color is changed by \w to White, by \m to Magenta, by \r to Red, by \b to Blue, by \y to Yellow, by \c to Cyan, and by \g to Green.

Kernel Words

text -a Address holding address for next read.
here -a Address holding next compilation address.
base -a Address holding radix for literals.
sign -a Address of characters of last token read.
fuss -a Address holding address jumped upon unknown sign.
open -a Address holding address of dlopen.
shut -a Address holding address of dlclose.
link -a Address holding address of dlsym.
; - If last compiled instruction was a call, change to a jump, else compile ret instruction.
read - Read one token from text into sign (up to 24 characters).
, n- Move n here and then advance here by 4.
c, n- Move the low byte of n here and then advance here by 1.
lit n- Compile code that leaves n on the data stack.
?lit -? Test whether last compilation was for a literal. If true, then you may use here @ -4 + @ to get the literal's value and decimal -12 here +! to uncompile it.
fnix - Reset words to these 15 words, reset here to the start of the 1 Mb BSS segment, reset bp to the end of the 1 Mb BSS segment, reset base to hexadecimal, reset fuss to a simple sign display exit, reset text to just after the embedded 'START:' tag in the (up to) 100 Kb TEXT segment, and then begin evaluating words.

White words are ignored. Magenta, Red, or Blue words are defined. Yellow, Cyan, or Green words must have already been defined.
(Literal numbers are treated as if they had been defined Magenta at the address given by their value).
Then, according to how the word was defined:
Color Magenta Red Blue
Yellow stack call N/A
Green lit compile call call
Cyan lit compile call compile call
If a Green or Cyan word is found to have been defined both Blue and Red, then the Blue word will be used; else the last definition will be used.
All else is generated from the embedded source, such as: x86.fnix linux.fnix
And here are some application examples: pi.fnix xml.fnix http.fnix
home