Hacker News new | ask | show | jobs
by dwgumby 443 days ago
Was playing with a 6809 system not long ago and, yeah, FORTH maps really nicely to it. S reg = parameter stack, U reg = return stack, Y reg = interpreter pointer. Inner interpreter is a single two byte instruction (jmp ,y++).

I'd always wanted to play with the 6809 and it really is a slick little 8 bit cpu.

2 comments

That's how I did it in 1983 (but I think with the roles for S and U swapped).

Note that what you're describing is directly threaded code; traditional FORTH uses indirect threaded code: http://www.complang.tuwien.ac.at/forth/threaded-code.html

You're right, I forgot the indirection. Inner Interpreter instruction is actually: JMP [,y++]
it's easily the king of 8-bits, the best of the bunch

the 6309 with its extensions... even more so

I found a very nicely done text file documenting the 6309 extensions that I am attempting to link to here in case other readers are like me in admiring the 6809 architecture and are curious about what got tweaked ... https://www.6809.org.uk/dragon/6309.txt