Blog

bb2-mode – Edit Blitz Basic II code in Emacs

For the past couple of months I’ve been messing about with some retro-programming, working on a little game in Blitz Basic II for the Commodore Amiga (more info coming soon). I just wanted a nice no-stress project to spend a few weeks on before making yet another attempt to change my life through code.

I grew up on Blitz, and it was fun to return to it again after 20 years. On a whim, I decided to write an Emacs major mode for Blitz II so I could edit and read code outside of an Amiga Emulator. It was also a good opportunity to practice my Lisp programming (Emacs plugins are written in Emacs Lisp).

bb2-mode not only provides syntax highlighting and online help for over 2400 Blitz II commands, it can load and save tokenized files. Blitz II saved its source code in a custom file format in order to save disk space. As far as I know, bb2-mode is the only thing outside an Amiga which can load and save these files. So even if the Emacs-using-retro-Blitz-programmer demographic isn’t that large, bb2-mode still has some value.

Anyhow, bb2-mode is on github and is under active development. I’ll have more to say about Blitz II in the future, so stay tuned.