⭅ Previous (PicoNES Player Announcement) |
QBasic was a popular programming environment, originally bundled with MS-DOS based computers. It was the first programming environment for many computing users. While old, there are many things about this programming environment that make it ideal even today.
While most computers aren’t running DOS anymore, we can still run QBasic. In this tutorial we will get QBASIC running on whatever computer you use today.
Table of Contents
We’ll get QBASIC running with the help of DOSBox, a free, open-source DOS emulator. DOSBox runs on most platforms today (Windows/Linux/Mac), and is very accurate. We can then run QBASIC through DOSBox, as though we were still running a DOS based computer.
To install DOSBox, head over to their main website, and download for your platform of choice.
If you’re running a Debian-based Linux system, a Dosbox package is also available in the repositories.
sudo apt install dosbox
Go ahead and install that now, then continue below.
Originally, QBasic was bundled with MS-Dos. Today, you can either get it from an old MS-DOS floppy, or find it from an abandonware website.
We’ve tested with the qbasic version from abandonwaredos.
Download and extract the archive to somewhere easy to find. We’ll need to type out the directory in the next step, so make sure to put it somewhere simple like your Desktop or home folder.
Lets start up DOSBox, then work on running QBASIC. We’ll need the path to the folder we extracted in step 2.
We’re on a Linux system, and have extracted it under our home folder. The path to QBASIC looks like
/home/alex/qbasic/
For a Windows system, you might have placed qbasic on your desktop, which would resemble:
C:\Documents and Settings\alex\Desktop
In order to access these files, we need to mount this folder within DOSbox. Replace the path in this command based on your own setup. Below is the command I used to mount the QBASIC folder:
mount E: /home/alex/qbasic
Finally, we need to navigate over to the qbasic folder to run it. In case you’re not familiar with DOS, the steps are:
E:
cd qbasic71
qb
Now to demonstrate that everything works, lets write a very simple QBASIC program. It will ask for your name, then greet you. This will give you a chance to experience the programming workflow, so you’re ready to experiment on your own.
INPUT "Enter your name: "; name$
PRINT "Hello there "; name$
After you’ve entered this program, hit f5 to run it. Now you can start writing QBasic programs!
In addition to writing your own programs, there are several classic QBASIC games freely available on the internet. You can search for “qbasic programs”, and there are a collection of fan sites, as well as some hosted by the internet archive.
To load an existing program with qbasic, you can do so from the command line. Launch qbasic with the filename as a parameter. Here we’ll play Gorillas, which is sort of an early ancestor of Worms and similar games.
qb gorillas.bas
You can also open files using the file menu within QBASIC. Press alt to access the menu, then you can use arrow keys OR the highlighted letter from the menu to navigate more quickly.
Happy gaming!
⭅ Previous (PicoNES Player Announcement) |