Sin Forth creates machine code programs for any model of ZX Spectrum or compatible computer, including the ZX Spectrum Next.
Author’s website: http://programandala.net.
The installation of Sin Forth needs two operations:
-
Make its sources accessible from Gforth.
-
Copy or link the compiler file (src/sin_forth.fs) in a directory of the system
PATH
.
There are two methods to make Sin Forth’s sources accessible from Gforth:
-
Add the Sin Forth’s <src> directory to Gforth’s
fpath
. Consult Gforth’s documentation. -
Make a symbolic link to Sin Forth’s <src> directory in Gforth’s <site-forth> directory. In a locally compiled Gforth, the command on a Linux shell would be the following:
sudo ln -s SIN_FORTH_PATH/src/ /usr/local/share/gforth/site-forth/sin_forth
where "SIN_FORTH_PATH" must be replaced with the corresponding path to Sin Forth’s directory on your system.
In order to make <src/sin_forth.fs> accessible anywhere, you may link
it to any directory in your system PATH
, removing its filename
extension for convenience:
Example:
ln -s SIN_FORTH_PATH/src/sin_forth.fs DIR/sin_forth
where "SIN_FORTH_PATH" must be replaced with the corresponding path to
Sin Forth’s directory on your system, and "DIR" can be replaced with
~/bin
or ~/.local/bin
.
-
Sin Forth uses some modules of the Galope library.
-
Some modules of Galope need modules of the Forth Foundation Library.
-
Sin Forth makes the ZX Spectrum .tap files by Metalbrain’s bin2tap, which must be installed in the system.
doc
|
Manuals in EPUB, HTML and PDF |
src
|
Compiler sources |
src/doc
|
Documentation sources |
src/lib
|
Library sources |
src/test
|
Tests sources |
target
|
Compiled and disassembled tests |
tmp
|
Temporary files created by |
Sin Forth is a "sin", because the programs it creates are not actual Forth:
-
No dictionary.
-
No outer interpreter.
-
No inner interpreter: the "compiled" code is a collection of machine code subroutines, like in a STC (Subroutine-Threaded Code) Forth.
-
No distinction between interpretation and compilation modes in the source code of the programs: during the "compilation", parsing and "immediate" operations are done by host words, i.e. Gforth words.
Besides, "sin Forth" is the Spanish for "without Forth", which is another way to describe Sin Forth.
Last, "Sin" is borrowed from "Sinclair".
-
2018-08-19: A Git repository was created from the development backups in order to resume the development.
-
2020-12-06: The Git repository was converted to Fossil.
-
2020-12-18: A GitHub mirror was configured in the Fossil repository.
-
2023-04-05: The repository was converted to Mercurial, enabling a better interaction with GitHub.
-
2023-10-13: The repository was published on Sourcehut; GitHub is kept as a mirror.