forked from larsbrinkhoff/lbForth
-
Notifications
You must be signed in to change notification settings - Fork 0
Metacompiled Forth, bootstrapping from a few lines of C.
License
christianheise/lbForth
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
( Subset of Forth94 ) The bootstrapping process uses a metacompiler written in Lisp to target a small inner interpreter and a handful of code words written in C. There is also a new metacompiler written in Forth which is intended to replace the Lisp version in the future. Work is under way to add a real target using assembly language code words. ( Further reading ) INSTALL \ How to build. doc \ Classic (and recent) texts not related to this project. lib/README \ Information about libraries. targets/README \ Information about current and possibly future targets. ( Implementation guide ) The Forth kernel contains everything needed to read and compile the rest of the system from source code, and not much else. It's composed of two parts: a target-specific file nucleus.fth containing all primitive CODE words, and a target-independent kernel.fth. These two are compiled by the metacompiler. The C target nucleus used for bootstrapping has only twelve proper primitives. There is also the COLD word which compiles to main(), a signal handler, and four I/O words. When the kernel starts, it jumps to the word called WARM. This is responsible for loading the rest of the system and entering the text interpreter. The first file loaded by WARM is core.fth, which implements the CORE wordset. Because the kernel only has a bare minimum of words, the start of core.fth looks a little strange.
About
Metacompiled Forth, bootstrapping from a few lines of C.
Resources
License
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published
Languages
- Forth 96.3%
- Emacs Lisp 1.4%
- Makefile 0.8%
- C 0.7%
- Shell 0.5%
- Batchfile 0.2%
- Awk 0.1%