Subroutine Thread Forth for the BBC

Got a programming project in mind? Tell everyone about it!
User avatar
Posts: 4
Joined: Tue Dec 01, 2015 3:07 pm

Subroutine Thread Forth for the BBC

Postby binaryprose » Thu Mar 02, 2017 10:34 pm

This was my first large assembly program, written in the summer of 1983 (at the age of 16)

The original program was written in BBC BASIC using the build-in assembler. Because the source has to be in memory to assemble, this limits the maximum size of any assembly program built using BBC BASIC. As work around I split the code into modules each chain-loaded as overlays.

This new version is the modern re-work of that original code. My ambition all those years ago was to turn my FORTH into a ROM image, sadly I never achieved this at the time.

The completed project is now available on github. (

The performance gains over am indirect threaded model on a 6502 are substantial. GSFORTH is currently the only subroutine thread FORTH for the BBC Micro, and in most use cases is approximately twice as fast as Acorn FORTH or MultiFORTH.

Please forgive me if the code is a little messy in places...I have not written any BBC assembly for over 25 years.

If anyone want to try it, please let me know and I put together a getting started guide.
(6.86 KiB) Downloaded 31 times

User avatar
Posts: 5985
Joined: Thu Oct 02, 2008 4:51 pm
Location: Manchester

Re: Subroutine Thread Forth for the BBC

Postby danielj » Fri Mar 03, 2017 8:46 am

this is excellent :D - and nice to see something ancient getting finished off! A getting started guide would be great!


User avatar
Posts: 2046
Joined: Sun Nov 11, 2007 10:11 pm

Re: Subroutine Thread Forth for the BBC

Postby davidb » Fri Mar 03, 2017 10:17 am

This is very interesting to see. My Forth skills are too rusty to give it a workout - not that they were all that great in the first place - but it's always nice to see new language implementations. Well done! :D

User avatar
Posts: 1733
Joined: Sun Jan 24, 2010 10:24 am
Location: West

Re: Subroutine Thread Forth for the BBC

Postby BigEd » Fri Mar 03, 2017 11:05 am

Should be of interest over on, so I've posted a note over there.