DOS Lesson 13: BASIC

Any long-time observer of the computer industry soon realizes
the crucial importance of choosing just the right name to yield just the right
acronym. (Quick, no peeking: What does PCMCIA stand for?) Back in the 1960s, two professors (John Kemeny and Thomas Kurtz) at Dartmouth College, in New Hampshire, USA, faced such a problem in naming the programming language they had developed. They came up with Beginner’s All-purpose Symbolic Instruction Code, known ever after as BASIC. This simple, yet powerful, programming language quickly became a hit in college courses all over the US (and probably well beyond). Quick to pick
up, you could write programs to do surprisingly complex tasks. I recall writing programs in BASIC in the 1970s when I took a couple of computer classes at the local University. Of course, I was writing my programs on a terminal connected to a mainframe computer, using a time-sharing account. That was the state of the art back then.

But at the same time I was learning BASIC in college, a few folks
were creating little miniature computers. These were mostly for hobbyists, of course. Early Heathkit models had to be assembled before you could use them, and were aimed at the electronics hobbyists. The real cool thing was the hardware. Software was almost an afterthought. But once you had your computer working, you would eventually go looking for software that could be used for programming. In those days, applications software scarcely existed on the hobbyist level, and no one really cared. People did frequently exchange programs with each other, of course. But purchasing applications software was unheard of.

Into this environment came a college dropout who moved to New
Mexico, and started up a company to supply a version of BASIC to those hobbyists. His name was Bill Gates, and he called his company Microsoft. After a while he was making a decent living out of selling BASIC, but his company was no more promising than any of the other small companies at the fringe of the hobbyist computer market. Of course, that changed when IBM came calling, but that is a tale for another time. The point to remember is that BASIC was something that everyone would automatically want to have on a computer at that time. Even with the development of the PC operating system (i.e. DOS), BASIC was still essential. The earliest PC models came with a version of BASIC installed on a ROM chip. This gave rise to the least understood error message in computer history. If you turned on one of those PCs, and it could not boot into DOS, you would see an error message about being unable to find BASIC. The BIOS would look for that
ROM chip, not find it, and give an error message. Of course, later computers
didn’t have a BASIC ROM chip, but it took a while for BIOS manufacturers to
catch up. These days, you would just get a message that it could not find a
bootable operating system.

When Microsoft purchased QDOS from a Seattle company, and then
resold it to IBM at a huge profit, they couldn’t resist adding in BASIC. In
earlier versions of DOS, this was a version of BASIC called GWBASIC. In later versions of DOS, it is QBASIC that is provided. So every copy of DOS came with its own bundled programming language! And of course Microsoft has not abandoned the language. It took BASIC, added some object-oriented stuff and a graphical interface, and thus begat Visual Basic. This is not given away free with each OS purchase, but a “lite” version, called Visual Basic for Applications (VBA), is included with Microsoft Office. It is used for writing Macros and automating certain things that Office applications can do. It is also the source of the problems with Office viruses.

In DOS, two of the key applications that you might want to use are actually coded in BASIC. They are EDIT, the text editor that you would use to make changes to your AUTOEXEC.BAT, and CONFIG.SYS files, and HELP, the application that you would use to look up the syntax, arguments, and switches for the DOS commands. When you run either the EDIT or the HELP application, what happens in the background is that BASIC is loaded, and then these applications run within BASIC. The reason it is important to know this is that if the right version of BASIC is not available, these applications will not run. I recommend that on your emergency DOS disk you copy these five files:

  1. EDIT.COM
  2. EDIT.HLP
  3. HELP.COM
  4. HELP.HLP
  5. QBASIC.EXE

Of course, you may find that you are running a little tight on space on your
emergency disk. Depending on what programs you have added, you may find that you need to either have two disks, or make some choices. I happen to think that the above files are absolutely indispensable in an emergency context. If you are an expert on using EDIT (and maybe you will be after we finish discussing it; it is the next topic.), you can perhaps drop the EDIT.HLP file. QBASIC.EXE is essential, of course, since neither EDIT not HELP will work without it. And the HELP system requires both of those files to run. HELP.COM is just a small (413 bytes) executable. All of the data of the help system is contained in HELP.HLP, so you cannot leave either of them off the disk.