Just For Starters

FOR USERS JUST GETTING STARTED IN COMMODORE COMPUTING

by Steve Vander Ark

Reprinted from Commodore World Issue #2



Last issue I started off this column by saying that my computer talks a lot. But then I proceeded to spend most of my allotted word count talking about how you, the user, talks to the computer. I did that on purpose, since talking to the computer by means of typing on the keyboard is one of the very first things you'll do once you get everything plugged in and powered up. (Take a look at the sidebar accompanying this column for more information about getting the cables all hooked up correctly.)

But now that you've started typing commands into the computer using that built-in computer language called BASIC, you'll need to know more about how the computer talks back to you. As I mentioned last month, the Commodore tells you right off the bat that it's ready to get started by saying "READY" and flashing its cursor. That's a handy thing to know, actually; if we started the computer and it didn't say "READY", we'd have to figure out what was keeping it so busy that it couldn't stop to talk to us.

Now I teach a class of third graders for whom computers are as natural as recycling bins and roller blades. But when one of our computers starts doing something they don't expect, like not saying it's "READY" when it should or not loading a program, they get frustrated. All of a sudden, that familiar old machine in the corner has become a blithering idiot. Some of them will try one or two quick fixes they have seen me use before, but usually they just stand back and frown and holler, "Go get Mr. Vander Ark!" They know, you see, that I understand what the computer is saying and that I know how to tell it to get back to work.

You, of course, won't be able to use the same strategy that my third graders use; you won't be able to "go get Mr. Vander Ark." You can, however, learn for yourself how to understand what the computer says when it isn't acting the way you expect.

The folks who designed the Commodore 64 and 128 knew that you and I would often need information about what was going on with our machines, so they included a set of "error messages" into the operating system (that's the built-in set of routines and commands that run the show, as you might recall). Error messages are one of the most obvious ways the computer has to tell you what's happening. To see an example, try typing "QWERTY" at the cursor and hitting RETURN. After a brief moment, you'll see the words "SYNTAX ERROR" on the screen. That is your computer's way of telling you that it has no idea what "QWERTY" means. The words "SYNTAX ERROR" are an error message, telling you that the computer doesn't understand what you just told it to do.

I think it's fairly safe to assume that you won't usually be trying to type commands like "QWERTY" into your computer. So why does the operating system need such an error message? You'll understand that well enough the more you type commands; the most common reason for a "SYNTAX ERROR" is a typing mistake, like entering LOAF instead of LOAD. Then, instead of cheerfully loading your program as you would expect, your computer will just sit there. That's when my third graders will come looking for me. That's when you can look at the screen and see that your computer is telling you with an error message what the trouble is.

You might wonder why the computer can't just say "I'm sorry, I didn't understand that last message." As a matter of fact, there's no particular reason why it can't. The phrases the computer uses are stored verbatim somewhere inside in its memory and if you know how to program you can actually change them to say whatever you want. I can only suppose that the original designers used fancy, technical terms like SYNTAX ERROR to save memory space, since every character of the message has to be stored. The trend nowadays, however, is to make error messages a lot more informative and helpful, since most computers have a lot more memory to play with than the 64 and 128 have.

There are other error messages you might encounter as you work with your computer. Another one you will see is "OUT OF DATA ERROR," which sounds pretty alarming. Chances are, that means that you've just accidentally moved the cursor over the word READY before you hit RETURN. The cursor is under your control, you see, using the arrow keys, and if you move it onto a word that's already on the screen and press RETURN, the computer will assume you just entered that word as a command. That's very helpful if you want to, say, give the same command twice or if you just received a SYNTAX ERROR and you want to fix your typing. But if you hit RETURN when the cursor is on the same line as some other word, the computer will probably not know what you mean; the result will be a SYNTAX ERROR. An exception is READY, and here's why: the word READ is actually a command in BASIC, so the computer tries to READ when you tell it to, and since the READ is followed by a Y, it tries to "READ Y". It can't do it and it tries to tell you so by saying that it's out of data.

There is a list in the manual that came with your computer of all the error messages the Commodore uses. That list gives some explanations for what the errors mean as well, so it's handy to have around. Unfortunately, the writers of the manual aren't always very good at putting things into plain language, which is probably why most people don't read manuals if they can help it. For example, you might see the error message "DEVICE NOT PRESENT" when you try to load a program. The manual defines this as follows: "The required I/O device was not available for an OPEN, CLOSE, CMD, PRINT#, INPUT#, or GET#". That may be true, of course, but what it really means for you is that you probably didn't turn on your disk drive and so the computer can't find it... the device you wanted, the disk drive, is apparently not present.

It would be great if there were an error message on the screen every time something went wrong, but unfortunately this isn't the way it works. A lot of the errors you'll encounter as you try to load and run programs will actually not be computer problems but disk drive problems. The disk drive has its own set of error messages, but they don't appear on the screen automatically. Instead, there's a little light on the drive that just blinks on and off as a way of saying, "Hey, something went wrong!" Then it's up to you to type a command to ask the drive what the problem is. Sometimes, though, a drive problem will make your computer sort of freeze up, which means you won't see a cursor to type in anything. If you don't see a cursor, your computer is stuck trying to talk to your disk drive but the drive is not answering. You can manually tell your computer to give up the attempt by pressing the RUN/STOP key; if that doesn't work, you can press RUN/STOP and RESTORE at the same time to reset the computer. If that fails, you'll just have to switch the computer off and back on again to clear things up.

As long as the disk drive's error light is blinking, though, an error message is being saved in a special spot in the drive's memory for you to check if you want. With the BASIC that comes built into a 128, this is a fairly simple task: you type PRINT DS$ and the message shows up on your screen. On the 64, thought, things are a lot tougher. Here's the sequence you need to type in:

     10 OPEN 15,8,15
     20 INPUT #15,EN,EM$,ET,ES
     30 PRINT EN,EM$,ET,ES
     40 CLOSE 15
Remember, this is in the computer's language, so you have to obey all the rules and type things in exactly as you see it here. When you have typed this all in, type RUN and press ?> to execute all the commands in order. The result will be a listing of all the error information on the screen.

The disk drive is one of the most important devices that you attach to your 64 or 128, so next month we'll continue this discussion from here, talking about various types of drives and how you use them. In the meantime, have fun with your Commodore!


View the Sidebar


[Sample Issue] [CMDRKEY.com Home]


Copyright © 2002 Click Here Software Co.
Comments and questions regarding this site
should be directed to support@cmdrkey.com