u/ekipan85

My 500 bytes Forth that wants to be fun to read and hack on.
▲ 24 r/Forth+1 crossposts

My 500 bytes Forth that wants to be fun to read and hack on.

(Permalink as of this post.)

I present Nictoforth: a space-and-pedagogy-constrained art Forth. It's carefully crafted to be read top-to-bottom:

  • The repo README sets the stage. Boot sector, serial IO via BIOS.
  • The assembly source is packed with narrative, rationale, and cross-reference. Search for:
    • "[0]" architecture if you want to dig in.
    • "[5]" interpreter, the heart of a Forth.
    • "[7]" the lovely straightforward compiler.
    • "[8]" the extremely wacky bootstrap. It's full of character but damn dense!
  • If you clone the repo you can do make terse | bat -l nasm or | less to cut away all the asides and just read the code.
  • An example demo session log. See it working.

u/s1nical posted their Milliforth fork the other day so I figured why not post mine too. It was lots of fun to write and educational besides!

github.com
u/ekipan85 — 22 hours ago
▲ 11 r/Forth

(Document permalink at time of posting.)

A couple years ago I saw someone on 4chan /g/ writing a Tetris in 6502, and I was tinkering around with durexForth so I tried my hand at writing one myself. I start them sometimes but don't usually get that far. This one came together mostly fully-formed in a week or two and I've been picking at it to pass time ever since.

In recent months I've mostly been documenting it. Maybe I can upgrade one or two "Forth curious" persons dabbling in this subreddit into "Forth tinkerers" by way of a nontrivial thing to prod at. It's dense in the Tetris and C64 weeds, though, shrinking an already small audience!

For your perusal.

Cross posts:

  1. durexForth github
  2. r/retrogamedev by u/r_retrohacking_mod2
  3. r/c64
  4. HackerNews
u/ekipan85 — 1 month ago