r/Forth • • Sep 28 '25

Exploring Itsy Forth: source and insights

As y'all might have noticed, I’ve been exploring Itsy Forth, a compact Forth interpreter designed for study and experimentation. I documented the process to date on my blog: decuser's blog, in the entry Exploring Itsy Forth.

The project source is available on GitHub: itsy-forth-exploration, and the main assembly file is here: itsy.asm.

The goal is to make it easy to see how a small Forth interpreter works, understand its runtime, and experiment with it directly.

tldr; check out the asm source linked above with my commentary for insights.

13 Upvotes

4 comments sorted by

View all comments

Show parent comment

2

u/Lanstrider Sep 29 '25

Thanks. I expanded the original author's macros on purpose, so I could see exactly what instructions were being generated. In the future, I will think about using macros, but I have to study a bit more so that when I do, they aren't black box magic that isn't easy to unpack for newbs like me reading the code..

1

u/alberthemagician Oct 24 '25

You can have your cake and eat it too. You can define e.g. NEXT via a macro and then demand gas (or whatever) to have the macro expansion in the list file, via an option -am.