Programming in QBasic

QBasic Screen in Comic Sans

QBasic did not actually use Comic Sans. That’s just my own degenerate Photoshopping.

Early computers almost always came with BASIC. As the name implies, it was a basic programming language that allowed you to make all kinds of simple programs. Though they didn’t invent BASIC, it was the software that put Microsoft on the map. I remember learning it, along with LOGO, on an Apple II in my gifted and talented program. I also played around with it quite a bit when I got my own computer. But these early versions of BASIC were crude even by the standards of the time. So when I got my second computer in 1993, I was able to move up to QBasic.

BASIC Command Line

The history of Microsoft Basic is too long and complex to discuss here. Suffice it to say that they made versions of BASIC for just about every 1980s computer platform. While the different versions had different features depending on the machine, they all functioned the same. You had a command line, much like MS-DOS, where any command would give an immediate answer. This could be useful. You could type “PRINT 1+1” and press Enter, and it would immediately reply with “2”. If you wanted to create a program, you had to number your commands. Generally, you numbered them by the 10s, so that you could add in commands you needed to. So to create a simple adding program, you might type:

10 INPUT A
20 INPUT B
30 PRINT A+B

If you did this, and then typed “RUN”, the program would ask you for two variables, add them, and print the sum. This was fine for short programs like the example above, but it could get cumbersome very quickly. To add a third variable for example, you might type:

25 INPUT C
30 PRINT A+B+C

And so on, using these early versions of BASIC involved a lot retyping and renumbering lines. Microsoft was aware of this, so in their later versions of MS-DOS, they came up with an entirely new programming interface.

QuickBASIC and QBasic

Microsoft replaced the crude command line function of BASIC with an Integrated Development Environment that more closely resembles modern programming tools. It had menus and mouse support like a modern graphical interface, though it still ran in text mode. They came out with two versions. QuickBASIC was the premium version, with a full suite of tools for developers. That meant you could use it to compile your own commercial software. (Though even QuickBASIC software ran slow compared to more professional languages like C.) Since people expected computers to come with BASIC, Microsoft also made a stripped down version called QBasic. This was the version I had.

Seeing it for the first time, QBasic looked more like a word processor than a programming environment. And rightfully so. Unlike the old command line versions of BASIC, QBasic allowed you to go back and edit lines. You no longer needed to number your lines (though you could if you wanted.) If you needed to insert a new line, you could just move your cursor into place and add a line. Just like a word processor. In fact, it was so word processor-like that Microsoft used it as the basis for its MS-DOS Editor. This text editor wasn’t even a separate program, just QBasic running without the programming commands.

The End of BASIC

I had a lot of fun programming in BASIC over the years. Mostly, I used the graphics commands and played games. And QBasic really hit the sweet spot for me. Earlier versions of BASIC were cumbersome to use, and later versions of the language, such as Visual Basic, were far more complex tools intended for developers. I remember playing around with Visual Basic for Windows in the mid-1990s, but I never figured out how to do more than create a dialog box. Maybe it was just me, but by the time I moved to Windows, the magic was gone.

Did you ever use QBasic or QuickBASIC back in the day? What about other versions of BASIC, earlier or later? Let me know your thoughts in the comment section.

Steve Lovelace

Steve Lovelace is a writer, photographer and graphic artist. After graduating Michigan State University in 2004, he taught Spanish in Samoa before moving to Dallas, Texas. He blogs every Monday, Wednesday and Friday at http://steve-lovelace.com.

You may also like...

6 Responses

  1. Zsolt says:

    I’d say that JavaScript & HTML are the “QBASIC” of the 21st century. JavaScript is very easy to learn, and it’s a universal language. It will run on any device. It doesn’t matter if you got an Apple or Linux PC or Windows or an Android cell phone. If you see a device that has a screen, chances are JavaScript will run on that device! And that’s why it has become extremely popular. QBasic, on the other hand, has become less popular and is dying because it was primarily designed for DOS, And most people don’t use DOS anymore. They don’t even know what DOS is. Also, many QBasic programs rely on features that are either no longer supported or simply cause Windows to crash. So, running some of the old BASIC programs is just a pain. I think, QBasic may still have a place in education, but not for long.

  1. February 6, 2017

    […] had used an Apple ][ computer at school, and thanks to my gifted and talented class, I knew a few BASIC commands. I tried typing a number of commands and lines of code, but every time I hit the Enter key, MS-DOS […]

  2. February 6, 2017

    […] addition to playing games, we also did some programming. Mainly we used BASIC. I was pretty good at it, especially since my mom and dad bought a Tandy […]

  3. February 15, 2017

    […] favorite old video games was a demo that came with MS-DOS. I spent a lot of time knocking around in QBasic. I never became an astute programmer, but I did develop a fondness for one of the included BASIC […]

  4. March 2, 2017

    […] hours just customizing the Windows color scheme. Still, I mostly used MS-DOS applications, like QBasic and a variety of DOS games. Overall, it was a pretty cool computer, though it wasn’t hip […]

  5. March 11, 2017

    […] and Apple went back to the 1970s. Microsoft supplied Apple with an advanced version of the BASIC programming language, as well as an expansion card that made Apple II computers of the era […]

Leave a Reply

Your email address will not be published. Required fields are marked *