A tiny and portable subroutine-threaded Forth.
You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
Clyne 98e2c14086
PoC msp430 register/flag support
12 months ago
source PoC msp430 register/flag support 12 months ago
.gitignore add msp430 proof-of-concept 12 months ago
LICENSE initial upload 12 months ago
Makefile concise wordwrap 12 months ago
README.md initial upload 12 months ago
compat.txt add msp430 proof-of-concept 12 months ago
core.fth add CREATE, DOES> 12 months ago
lzss.h PoC msp430 register/flag support 12 months ago
msp430.cpp PoC msp430 register/flag support 12 months ago
msp430fr2476_all.h PoC msp430 register/flag support 12 months ago
sprit.cpp concise wordwrap 12 months ago

README.md

sprit-forth

Sprit Forth is a tiny and portable subroutine-threaded Forth written in modern C++. It is inspired by Alee Forth and milliForth.

Subroutine-threading is an improvement over Alee Forth's tokenized threading: words are compiled as lists of function pointers such that their execution is direct and "native". By sticking to subroutines instead of directly compiling assembly instructions, Sprit Forth maintains entirely portable.

In terms of size, the libsprit.a library is only around 4kB on x86_64 without optimizations, down to around 2kB with size optimizations, and under 1kB on a 16-bit MSP430 microcontroller.

Sprit Forth is early in development. The project won't be considered "stable" until at least the core standard word-set is implemented.

Requirements

A C++ compiler that supports the C++20 standard.

Building

Run make. There are x86 and msp430 targets available to target those architectures.