Bootstrapping
RetroForth's bootstrap process is a bit different than in most Forths. We define a small core kernel containing the basic compiler and a few I/O words. Everything else is built from source code upon startup. This source code is included directly into the binary. This allows the binaries to be self-contained easily.
The source code is generally placed in a file named core.f before inclusion into the core. The build process regenerates this from several smaller files in the source/blocks directory.
These smaller files are what define the RetroForth language and environment. Let's take a quick look at them:
base Contains the RetroForth language (required)
welcome Displays a nice welcome message (optional)
colors Support for foreground/background colors (optional)
red The editor (optional, needs colors)
red-view The view portion of the editor (optional, needs red)
blockio Load and save blocks (optional, needs red)
edit The editor UI (optional, needs red-view)
The only one required is base. The default system includes the others as they provide a lot of useful functionality in terms of making RetroForth a useable development environment.
Note: the source blocks need to leave the address of the custom interpreter on the stack. The default base provides this.