lbForth

Self-hosting metacompiled Forth, bootstrapping from a few lines of C; targets Linux, Windows, ARM, RISC-V, 68000, PDP-11, asm.js.

Github星跟踪图

( Subset of Forth94 )

This is a self-hosted implementation of Forth, which can regenerate
itself from Forth source code. The bootstrapping process uses a
metacompiler written in Lisp to target a
small inner interpreter and a handful of code words written in C. A
new metacompiler written in Forth generates an x86
executable using using assembly language code words.

There are also ARM, RISC-V, Motorola 68000, PDP-11, and asm.js
targets. There is a cross
compiler
for 6502, 8051, AVR,
Cortex-M, MSP430, PDP-8, PIC, and STM8.

( Continuous integration )

The code is continuously built and tested in Linux, MacOS X, and
Windows using several cloud-based continuous integration services.
This is documented in build.md.

( Further reading )

INSTALL \ How to build.
doc \ Classic (and recent) texts not related to this project.
lib/README \ Information about libraries.
targets/README.md \ 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(), 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.

主要指标

概览
名称与所有者larsbrinkhoff/lbForth
主编程语言Forth
编程语言Makefile (语言数: 9)
平台
许可证GNU General Public License v3.0
所有者活动
创建于2012-09-18 11:45:37
推送于2023-02-13 06:56:57
最后一次提交2023-02-11 17:48:52
发布数0
用户参与
星数458
关注者数31
派生数113
提交数815
已启用问题?
问题数75
打开的问题数40
拉请求数16
打开的拉请求数1
关闭的拉请求数2
项目设置
已启用Wiki?
已存档?
是复刻?
已锁定?
是镜像?
是私有?