Microsoft QuickBASIC Decoder

The program below makes an attempt at converting a tokenized Microsoft QuickBASIC program into readable ASCII text. It was helped along by this old article and by experimenting with BASIC files I had on my Mac. Some of them go back to the mid-'80s and I think some were saved by GWBASIC on a PC.

You run the program like this: <basic_program >basic_program.txt
MS BASIC programs start with a byte that seems to give version information. The values I've seen are: From this slim evidence I have guessed that the 0x08 bit being off says it's the newer BASIC format (4- vs. 3-byte GOTO labels, symbol table instead of variable names inline...), and that the 0x02 bit means decimal arithmetic.

If anyone's got

I would be really grateful if you'd send me copies to look at.

And of course any reports of experiences with this program are welcome.

(pyramus7hits.qb is the BASIC program that motivated me to do this; pyramus7_hits_french.mid is a MIDI-fied version of the output I rescued from it.)

-rwxr-xr-x   1 sw  staff  18043 May  9 13:36
-rw-r--r--   1 sw  staff  29350 May  9 14:34 pyramus7_hits_french.mid
-rw-r--r--   1 sw  staff   2233 May  9 14:34 pyramus7hits.qb

This ls -l style index was made with a php script.

--Steve Witham
Up to my home page.