5 preForth is a minimal non-interactive Forth kernel that can bootstrap itself and can be used as an easy-to-port basis for a full Forth implementation.
7 preForth feels like Forth - it's mainly a sublanguage of ANS-Forth - but is significantly reduced in its capabilities.
9 ### Features: minimal control structures, no immediate words, strings on stack, few primitives
15 - Only ?exit and recursion as control structures
17 - optional tail call optimization
19 - signed single cell decimal numbers (0-9)+
20 - character constants via 'c'-notation
21 - output single cell decimal numbers
25 - no immediate words, i.e.
26 - no control structures IF ELSE THEN BEGIN WHILE REPEAT UNTIL
29 - no memory @ ! CMOVE ALLOT ,
30 - no pictured numeric output
34 - no dictionary, no EXECUTE, not EVALUATE
40 Just 13 primitives: emit key dup swap drop 0< ?exit >r r> - nest unnest lit
44 simpleForth is an extension to preForth built using preForth. It is still non-interactive but adds
46 - control structures IF ELSE THEN BEGIN WHILE REPEAT UNTIL
47 - definitions with and without headers in generated code
48 - memory: @ ! c@ c! allot c, ,
51 - immediate definitions
55 Forth is a simple interactive Forth system built using simpleForth.
56 Forth is open ended and has a yet incomplete set of features. Work in progress.
61 An i386-Backend (32Bit) indirect threaded code implementation based on [FASM](https://flatassembler.net/) is pre-configured.
62 PreForth initially bootstraps on with [gforth](https://www.gnu.org/software/gforth/) or [swiftForth](https://www.forth.com/swiftforth/).
63 You'll need one of these for the first bootstrap.
68 This will successively compile preForth, simpleForth, then Forth.
76 last * warm cold empty patch minor major banner quit restart REPEAT WHILE AGAIN
77 UNTIL BEGIN THEN ELSE IF ; : constant variable header cmove compile, , allot here
78 dp +! clearstack interpret parse-name \ .( ( parse (interpreters ?word (compilers ,word
79 immediate !flags @flags or and #immediate ] [ interpreters compilers handlers ,'x' ?'x'
80 ,# ?# scan skip source /string >in query #tib tib accept min words .name l>interp l>name
81 l>flags type count cell+ cells find-name .s prefix? compare 2dup 2drop rot off on ?dup +
82 space bl cr . u. negate > 1- nip = 0= pick 1+ < over depth execute c! ! c@ @ ?branch
83 branch lit exit unnest - r> >r ?exit 0< drop swap dup key emit bye
85 Inspect sources and generated files.
87 *Have fun. May the Forth be with you.*