Name | Modified | Size | Downloads / Week |
---|---|---|---|
fnix-1.3.tar.gz | 2016-11-04 | 40.7 kB | |
README | 2016-11-04 | 2.5 kB | |
fnix-1.2.tar.gz | 2015-07-16 | 61.6 kB | |
Totals: 3 Items | 104.8 kB | 0 |
http://sourceforth.net/projects/fnix The ff 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 on the stack. Execution begins with the 'fnix' word. Current color is changed by ( to White, by # to Magenta, by : to Red, by { to Blue, by [ to Yellow, by } to Cyan, and by ] to Green. Magenta Words ------------- text ( -- n ) \ Address holding address for next 'read'. here ( -- n ) \ Address holding next compilation address. base ( -- n ) \ Address holding radix for literals. sign ( -- n ) \ Address of characters of last token 'read'. fuss ( -- n ) \ Address holding address jumped upon unknown 'sign'. open ( -- n ) \ Address holding address of dlopen. shut ( -- n ) \ Address holding address of dlclose. link ( -- n ) \ Address holding address of dlsym. Blue Words ---------- ; ( -- ) \ If last compiled instruction was a call, change \ to a jump, else compile ret instruction. Red Words ------------ 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. 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' 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. All else is generated from the embedded source (ff.fnix).