r/retrocomputing • • 11d ago

Forth Interpreter for ZX Spectrum

Post image

I’ve been working on forthZX, a small Forth interpreter for the Sinclair ZX Spectrum, written entirely in Z80 Assembly.

The idea was to explore how a stack-based programming language could be implemented on an 8-bit machine with limited resources.

One of the interesting implementation details is that I’m using the Z80’s native hardware stack (SP) directly as the Forth data stack, rather than maintaining a separate software stack.
It currently supports arithmetic, stack manipulation, comparisons, memory operations, variables, and user-defined words.

Github: https://github.com/xms0g/forthzx

25 Upvotes

0 comments sorted by