• Stars
    star
    388
  • Rank 106,973 (Top 3 %)
  • Language Forth
  • License
    GNU General Publi...
  • Created over 11 years ago
  • Updated about 1 year ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

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

( 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.

More Repositories

1

awesome-cpus

All CPU and MCU documentation in one place
HTML
1,800
star
2

httptunnel

Bidirectional data stream tunnelled in HTTP requests.
C
366
star
3

emacs-history

Historical Emacs Software Preservation
C
221
star
4

emacs-cl

Common Lisp implemented in Emacs Lisp.
Emacs Lisp
162
star
5

terminal-simulator

Simulation of VT52 and VT100 terminal hardware.
C
106
star
6

fmacs

Emacs clone in Forth.
Forth
96
star
7

forth-documents

Forth douments, books, papers
HTML
68
star
8

nybbleForth

Stack machine with 4-bit instructions
Forth
64
star
9

emacs-16.56

Build and run Emacs like it's 1985
C
61
star
10

xForth

Experimental Forth cross compiler for tiny devices
Forth
59
star
11

forth-mode

Wants to be the SLIME of Forth
Emacs Lisp
56
star
12

forth-metacompiler

Forth metacompiler written in Lisp, for bootstrapping
Common Lisp
36
star
13

m68k-microcode

18
star
14

docker-emacsen

Multiple versions of Emacs in a Docker image
Shell
18
star
15

pdp10-its-disassembler

Disassembler and other tools for files in ITS formats
C
15
star
16

tt2500-raw-data

Unsorted files for Minsky's TT2500 computer
Roff
14
star
17

crt-simulation

CRT simulation, as seen on TV
C
14
star
18

forth-compiler

Native inlining constant folding register allocating Forth compiler
Forth
14
star
19

glsl-sphere-tracing

Ray tracing implicit surfaces with GLSL using the "sphere tracing" algorithm.
GLSL
14
star
20

its-archives

BUG-ITS, ITS-LOVERS, ITS-HACKERS, AI & LCS & DMCG memos
Awk
13
star
21

pdp10-gcc

PDP-10 backend for GCC 3.2
C
13
star
22

pty-stdio

Redirect pseudo-terminal I/O to stdin and stdout
C
12
star
23

prebuilt-emulator-images-with-interesting-software-installed

12
star
24

fearless-git

Rewrite Git History Like There's No Tomorrow
11
star
25

imp

New implementation of an Arpanet IMP
C
10
star
26

Knight-TV-font

Font used by the MIT-AI Knight TV
Perl
10
star
27

sixel

Emacs Lisp
9
star
28

absolutely-not-a-vaxstation100-emulator

Go away, nothing to see here!
9
star
29

bubble-universe

"Bubble Universe" display hack
JavaScript
9
star
30

crunchly

8
star
31

build-tenex

Attempt to build TENEX
Stata
8
star
32

its-manual

ITS Reference Manual
8
star
33

tools-for-unusual-tape-formats

C
7
star
34

forth16

Emulate a 16-bit Forth inside a 32/64-bit Forth
Forth
7
star
35

squeeze

CP/M SQUEEZE and UNSQUEEZE for Unix
C
7
star
36

MinskyForth

Forth for the TT2500.
Common Lisp
6
star
37

vt52-simulator

VT52 hardware simulation.
C
6
star
38

git-scripts

Scripts for automating git and GitHub tasks
Shell
6
star
39

pdp10-small-libc

Small C library for the PDP-10.
C
6
star
40

FujiBoink

Source code for the classic FujiBoink demo for the Atari ST.
C
5
star
41

pdp10-wall-crock

Abuse a 70s mainframe as a wall clock
C
5
star
42

Lisp-lab

Unsorted Lisp snippets.
Common Lisp
5
star
43

DECROMs

Backup of http://www.dunnington.info/public/DECROMs/
5
star
44

2bsd

WARNING: this repository WILL be mercilessly force pushed.
Shell
4
star
45

pdp10-js

JavaScript applications for talking to PDP-10 emulators
JavaScript
4
star
46

linux-ncp

ARPANET NCP for Linux, and IMP-host interface to SIMH
C
4
star
47

its-presentation

Talking about ITS
HTML
4
star
48

xmas-leds

LED strip lit by microcontroller Forth
Forth
4
star
49

mit-logo-and-sits-raw-files

Roff
4
star
50

forth-games

Space invaders in Forth.
Forth
4
star
51

its-book

A book about ITS?!?
4
star
52

pack-ice

C
3
star
53

unmsa

Convert an MSA floppy file to a plain image
C
3
star
54

its-interviews

Notes before/during/after interviews related to the Incompatible Timesharing System.
3
star
55

vector-terminal

General purpose vector terminal
JavaScript
3
star
56

abermud

HTML
3
star
57

hdri-io

Input/output for various HDRI formats
Common Lisp
3
star
58

ooits

Resurrect ancient 1971-73 versions of ITS
Roff
3
star
59

trek7

TREK7 game by Donald Ecclestone
Fortran
3
star
60

value-change-dumper

Dump values that change!
C
3
star
61

image-tape

Make an image from a magnetic tape.
C
3
star
62

pdp10-gcc-test

Tests for the GCC PDP-10 backend
Assembly
3
star
63

compile-teco-to-emacs-lisp

Compile TECO to Emacs Lisp
Emacs Lisp
3
star
64

tops20-v2

TOPS-20 V2
Batchfile
3
star
65

forth-continuous-integration

Forth continuous integration
Forth
3
star
66

kldcp

Attempt to make a bootable KLDCP disk image, and boot it with SIMH PDP-11/40
2
star
67

arpanet-map

ARPANET topological data
2
star
68

sunview-x-mazewar

Mazewar for Sunview/X
C
2
star
69

linux-ddt

DDT for Linux
C
2
star
70

munching-squares.el

"Munching Squares" for Emacs
Emacs Lisp
2
star
71

ards-files

Kind of like the X files but for ARDS
Roff
2
star
72

ks10-udis

KS10 microcode disassembler
C
2
star
73

pidp-kl10

Stuff to make a KL10 version of the PiDP-11
2
star
74

xoroshiro-36

36-bit xorshift
C
2
star
75

pdp6-timeline

Photo timeline for the Project MAC / MIT AI lab PDP-6.
HTML
2
star
76

systemd-files

Useful systemd snippets.
2
star
77

haliaeetus

The Soul of an Old Machine
2
star
78

pdp10-periodic-build

Periodically build TOPS-10 and TOPS-20
Shell
2
star
79

emacs-cl-compiler

Compiler: Common Lisp to Emacs bytecodes
2
star
80

its-history

Git history for the Incompatible Timesharing System
2
star
81

rtape

RTAPE server
C
1
star
82

XX

File tree from MIT-XX
1
star
83

bcc-500

Experiments with BCC-500 data.
C
1
star
84

github-scripts

Shell
1
star
85

pclites

Running lights in program counter indicators.
1
star
86

vttest

C
1
star
87

t-shirts

1
star
88

absolutely-not-a-bcpl-compiler

D
1
star
89

xgp-fonts

MIT XGP fonts, converted
Shell
1
star
90

tape-lab

Examine and recover data from broken tape images
Common Lisp
1
star
91

techsquare

Terminal emulators for ITS, installed on a Raspberry Pi
Shell
1
star
92

ptrace-proxy

Proxying for ptrace operations
C
1
star
93

bbn-reports

Backup of BBN reports
1
star
94

tape-maps

Move on, nothing to see here
Roff
1
star
95

colorimetric-data

Colorimetric data: color matching functions, illuminants, etc.
Common Lisp
1
star
96

twitter-data

JavaScript
1
star
97

ding

Ring a bell
C
1
star
98

libword

A library for reading and writing binary words.
C
1
star
99

KU10

(Placeholder for) Kμ10 - PDP-10 microcontroller
1
star
100

m16c-flash

M16C flash tool
C++
1
star