You have found a secret area.

HOWTO Play With Your Old QBasic Programs on Linux

Date/Time Permalink: 03/31/07 01:21:43 pm
Category: HOWTOs and Guides

Most any geek who was a kid in the 80's played with BASIC at some point. And the BASIC language with one of the biggest followings is Microsoft QBasic - Microsoft's sole nod to the hobbyist programmer community. Dozens of online sites exist today that are devoted to QBasic, Quick Basic, and Basica, existing in much the same spheres as the surviving BBS/ ANSI art culture. If you still have some old floppies with archives of BASIC programs from your juvenile years which you'd like to revisit, here's how to do it on a Linux box:

Step 1: Get a copy of DOSbox. DOSbox is a no-brainer to install and set up, with its main dependency being the SDL library. Once you have that in, I recommend creating a directory named /DOS/ under your home directory - note that this is a plain old ext2 (or whatever you have set up) file system directory, you don't need to create a special FAT or DOS partition. Thereafter, starting your simulated DOS environment will involve starting DOSbox, typing "mount c ~/DOS/", then typing "c:", and you can then type "dir" to see that you're in your simulated "C:\" drive. Wasn't that easy?

Step 2: Find a QBasic version to download! Here's one. This is tricky - these sites come and go, and Microsoft, which hasn't supported QBasic for centuries, plays peek-a-boo with these DOS legacy program downloads all the time - it's a 50/50 break whether you can get the Microsoft site or an MS Windows system to admit that QBasic ever existed. Rumors abound of hidden folders on install disks. The last version goes by the string "QB45.ZIP" and when you've hunted it down, unzip it to a folder in your /DOS/ directory.

Next you have to format two floppies as DOS and write the disk packages to each. After that, mount the disks in the usual way in Linux, then 'mount' them in DOSbox with "mount a" and your floppy directory, then mount your "C:\" drive, cd to the A:\ directory and run "SETUP.EXE". Follow directions from there. NOTE: As Max Atkin points out in the comments, you can also have the disk images in your directory path and mount them that way without physical floppies.

Step 3: I didn't even bother with installing the second disk, since I'm not interested in making any more binary .EXE files, and the second disk is mainly support for the compiler. QB.EXE runs just fine with the install from disk one, and will be able to read your .BAS files. You can try out the demo BASIC programs included in the "EXAMPLES" directory. Everything works just like you remember, with your embarrassing old graphics demos and munchkin hax running in glorious 640x480 16 mode.

QB screenshot 1
A Mandelbrot demo from the example programs.

QB screenshot 2
One of my graphic demos.

UPDATE: Years after I posted this, I got into Flash toys, and this same idea is now implemented as "circlerama" in the sidebar to right right of this page.

QB screenshot 3
A hilarious drawing program I did, because I missed the old Apple MacDraw drawing mirrors feature so much.

UPDATE: Likewise, the same story goes for the Flash toy "drawdemon", also in the sidebar.

QB screenshot 4
The splash screen to an old tank shooter game I did. You aren't missing a thing by not playing it, believe me!

QB screenshot 5
Who didn't do a hangman game in their learning days?

QB screenshot 6
A draw poker demo game I did. Yes, I drew each card in my own invented bitmap format, saved as plain data files, because QBasic back then didn't have a way to display bitmaps that I was aware of.

Step 4: Thank your lucky stars that you've come a long way since these days!

Follow me on Twitter for an update every time this blog gets a post.
Stumble it Reddit this share on Facebook

suddenly the moon