QBASIC for Everyone

There is a nice series of blog post (4 parts, as of writing), I Was a 1980s Teenage Programmer, which is highly recommended, by the way.

It’s in part 3 that we find this passage:

My father had switched from Microsoft GW BASIC to Microsoft QuickBASIC around this time on the Olivetti M24. This did away with the need for line numbers and introduced named locations you could GOTO or GOSUB from. Wild stuff. But not on my MSX-2. This had the conventional line-number based BASIC.

Inspired by this, I first added a proprocessor for “.qb” files to the PET 2001 emulator. However, we really shouldn’t be too greedy or overly partial to a specific system. So I made this a stand-alone tool, as well, which accepts source code per copy&paste or by drag&drop and transforms it to common BASIC.

This supports

  • automatic line numbering
  • comments with apostrophes (single quoutes)
  • labels and named targets with square brackets (`[…]˚ )

The tool is case agnostic and should work with every BASIC dialect (as long as single quotes do not appear outside of strings, or square brackets aren’t part of the language.) In order to make this work with BBC BASIC-like inline assembly, any unclosed square brackets will trigger a warning, but the transformation will still succeed.

And here it is:

6 Likes