3 ms·
Show HN: Computing with just one instruction – Forth on SUBLEQ
Hello HN,
This is a project of mine which contains a working, self-hosting,
Forth interpreter for a single instruction machine. The instruction
is called "SUBLEQ", short for (SUB)tract and branch if (L)ess
than or (EQ)ual.
Everything has to be synthesized from that instruction, bitwise
operators have to be implemented in terms of repeated subtraction and
self modifying code used to create indirect loads and stores. In doing
this it is possible to port a working language that is capable of
generating new images for the machine.
It's possible to play with it online at:
https://howerj.github.io/subleq.htm https://howerj.github.io/subleq.htm
(feedback welcome)
The Forth is fairly feature full and includes cooperative multitasking.
- schemescape 4y agoI’d there’s one thing the world needs more of, it’s subleq :)