Classic Computer Magazine Archive COMPUTE! ISSUE 39 / AUGUST 1983 / PAGE 54

THE BEGINNER'S PAGE

Richard Mansfield, Senior Editor

Types Of Programs

Let's continue with our overview of the major categories of personal computer programs. The Operating System, the Disk Operating System, "utility" programs, and telecommunications programs all have several qualities in common, so we'll look at them as a group.

The Master Control Programs

In most home computers there are about 16000 memory cells set aside to hold the BASIC language and to hold the Operating System. These cells are ROM memory, which means that they cannot be erased: you can't put new information into them, and they'll hold their original information even after you turn off the power. What kind of information is in these ROMs?

BASIC generally occupies about 8000 cells (8K) and is the familiar language you use to write programs. The other 8K of ROM memory holds the Operating System (OS). This, like BASIC, is a special kind of program. You might think of it as a background program which allows the computer to coordinate its other activities (including BASIC programs).

BASIC includes many individual machine language subroutines with which the computer can add numbers, enter REMarks into a program, and most of the other actions that a computer takes while a BASIC program is RUNning. However, when a program must communicate with something outside — a disk drive, a cassette drive, a printer, or the keyboard and screen — BASIC asks for help from the OS.

Body And Mind

The Operating System's primary responsibility is to keep track of communications between the "thinking" part, the brains, of the computer and the outside world. The brains are BASIC itself and the Central Processing Unit, the chip that does all the calculations. Like BASIC, the OS is made up of many machine language subroutines. These subroutines have names like LISTEN, TALK, UNLISTEN, SCAN KEYBOARD, OPEN CHANNEL, and UNTALK. You can't use these words in a BASIC program, but whenever you PRINT, OPEN, GET, or SAVE, BASIC calls upon the OS to help coordinate and accomplish the job at hand.

It might be convenient to think of BASIC as the computer's "mind" and the OS as the "central nervous system." When your consciousness makes a decision to eat another bite of beef stew, you then turn the job over to lower, unconscious parts of your brain. That is, your nervous system takes command of the movements of your arm and guides the fork to your plate. You're watching TV or talking while your personal operating system orchestrates tasks like SCAN PLATE, OPEN MOUTH, and so forth.

Similarly, when you first wake up you're not fully conscious. Warming yourself, stretching, opening your eyes, and all the other preparations for waking are carried out in a stupor. Your nervous system is rousing itself, and your conscious mind enters the picture at the end of a series of preliminary events. Here are some of the things that the OS does in a Commodore computer when you turn it on: establishes the normal arithmetic mode; clears out a short-term memory zone; sets up communication channels with the keyboard, screen, etc.; starts the clock and clears out the sound chip; tests all of memory; and clears the screen. Then, after the OS has finished — it all takes about a second — control is turned over to BASIC.

The Disk Unconscious

The job performed by a disk drive — it's a high-speed, automatic library — is so complex that the "intelligence" required to operate it can rival the brains of the host computer. What the OS is to the computer, the Disk Operating System (DOS) is to the disk drive. It performs all the routine chores of storage, retrieval, and organizing of the programs or pure information (data, like an address file) on disks. The internal subroutines of DOS have names like ALLOCATE BLOCK, UPDATE BLOCK MAP, FIND CHANNEL, and MATCH FILE. Your request to LOAD a program from disk can go to BASIC, then to the OS, then to the DOS. Each does its part.

Where is DOS located? In some computers (Atari, Apple), the DOS program must first be loaded into the computer (using up some RAM memory) before you can communicate with the disk drive. An alternative used by TI and Commodore, among others, is called distributed intelligence. All the elements of a true computer are in the disk drive: RAM and ROM memory, a CPU, and associated computing chips. One of the advantages to having a DOS which is separate from the main computer is that you can send instructions to the disk drive such as INITIALIZE (prepare a blank disk to receive new information). If the drive is an "intelligent peripheral," it will then work merrily away under its own supervision and your computer is free to accept other, unrelated instructions at the same time.

By the way, if you've recently purchased a 1541 disk drive for your VIC or 64, don't be confused by the name of the "DOS 5.1" program. It's not the DOS, it's a utility program which makes it easier for you to communicate with the true DOS.

Programmers' Bag Of Tricks

Utilities are programs that help you write programs. Most versions of BASIC lack some of the tools which would contribute to efficient programming. Utilities can be loaded in from tape or disk and perform a valuable function. Examples include: renumber, mass-delete, automatic line numbering, list all variables, merge two programs, repeating keys, bidirectional scrolling, trace (the active BASIC lines appear onscreen during a program's execution), and various graphics and sound commands.

Utilities are often grouped together and sold commercially. Alternatively, COMPUTE! and COMPUTE!'s Gazette publish several utilities every month. Watch upcoming issues for a program for the Commodore 64 called "BASIC AID" which includes all the utilities mentioned above in addition to 22 others.

The Brainless Computer

One of the most promising and fastest-growing areas of personal computing is telecommunications. Connect your computer to a telephone and you can then communicate with large data bases (information storage facilities), more powerful computers, and news and information services. Your computer can become an extension of far larger systems. What happens is that your own RAM and ROM can be bypassed in favor of the greater computing power available to you when you're in contact with a huge computing system located somewhere else. Its stored knowledge, speed, and its connections with other huge systems all become available to you. Your own computer acts simply as a keyboard/TV combination, a "brainless" unit sometimes referred to as a dumb terminal. If some of your RAM or ROM are being used, it would be called a smart terminal since some of the actual computing is going on at your end.

In either configuration, you telecommunicate by attaching a box called a modem to your computer; that makes the connection between your machine and the phone. The program which handles the communication is often called a terminal emulator and is usually included when you buy a modem.