By Tom R. Halfhill — originally published in COMPUTE!’s Gazette Issue 2, August 1983
Two more considerations are traffic and lighting. If space allows, it’s best to set up your computer in an area of your home that is not often used by other members of the household, to protect both your hardware and your privacy. Also, good lighting is important, although glaring lamps or sunlight can make the screen hard to see. An adjustable reading lamp next to the computer is ideal.
Instructions for appliances are probably the most avoided reading material in America, except for maybe the classics everyone is assigned to read in high school.
With most appliances it doesn’t matter. The majority of people can figure out on their own how to operate a toaster or a blow dryer. But computers are different. If you got away with faking the book report on A Tale of Two Cities, you’ll quickly discover that a computer is not as easily fooled as Miss Mindbender was.
Naturally, the last thing anyone wants to do when they bring a new computer home is plod through a dull manual. In the long run, though, it will save you hours of frustration. At the very least, read the section on setting up the computer. You are dealing with electrical connections between two sensitive electronic devices (three if you have a Datassette or disk drive), so everything needs to be plugged in correctly. The plugs fit only one way, so don’t force anything.
Incidentally, whenever you’re plugging or unplugging anything on the computer, make sure the power is turned off. You can often get away without doing this, but occasionally an accidental short circuit caused when a device is connected or disconnected can do some hardware damage. This is particularly true of cartridges, which can be blown if the computer is not powered down first.
One common mistake when setting up a computer results in a blank screen, or a screen full of static, when the machine is switched on for the first time. The problem is that the computer is not tuned to the same channel as the TV set. The computer needs a vacant TV channel to display a clear image. On the back of the Commodore 64, or on the RF modulator box of the VIC-20, there is a small slide switch. This must be set to either channel 3 or 4, depending on which channel in your area is unused (some switches choose between 2 or 3). The TV, also, must be tuned to this vacant channel.
Some other things to check when setting up a computer:
• Be sure the computer is connected to the television’s VHF antenna terminals, not the UHF terminals.
• Make sure the little switchbox connected to the terminals is set for “Computer” or “Game” instead of “TV.”
• If you have a clear screen image, but if the colors seem off, tune in a regular TV show. Adjust the TV’s color controls for proper flesh tone and so forth. Switch back to the computer. Usually the colors will now be about right. If the computer’s screen colors are drastically distorted, or absent altogether, your computer may be at fault. This is a relatively minor problem. There are color controls inside the computer which can be adjusted by your dealer. (Never attempt to adjust these yourself, because any tampering with the computer voids the warranty.)
• If you have more than one disk drive, the device numbers must be altered for them both to work. (See this month’s “Gazette Feedback” column.)
As you probably know, a program is simply a list of commands that tells a computer what to do and how to do it. A program can range from one line (PRINT “HELLO”) to hundreds of lines.
Since a computer is next to useless without programs – also known as software – you’ll want to start building up a program library soon after you get your computer. Your collection will depend on your personal interests – games, education, home applications, programming utilities, business, or whatever. No matter what your interests, there are only three (legal) ways to acquire software: you can buy it prewritten, write it yourself, or type it in from books and magazines.
The easiest way is to buy it. Unfortunately, this is also the most expensive way. A good commercial game program can cost $20 to $50 or more. Some business programs, programming languages, and advanced utilities can cost more than the computer. Of course, if you’re a videogame addict whose loose change is the prime source of nourishment for the local arcade machines, $35 for a game that’s good for unlimited plays can be a fantastic bargain. However, if you’re like most people, you can’t afford to line your bookshelves with commercial software. You’ll buy a good program now and then, but will look for other ways to enlarge your library.
One way is to write programs yourself. If you’re not technically minded, don’t dismiss this idea offhand. Thousands of people have discovered that computer programming is not as difficult as they feared. It can also be a highly creative and rewarding pursuit. However, it does require study and patience. If the time comes when you are interested in doing your own programming, you can find programming manuals, books, and magazines which will explain the process in detail.
A surprising number of people have picked up programming almost by osmosis, simply by typing in programs from magazines and books – which is the third way of acquiring software. Not only can you collect a lot of programs this way for very little money, you may also gain an intuitive understanding of how programs work just by being observant as you type.
You’ll probably be anxious to enter a few programs as soon as you get your system up and running. But before you start typing, it’s wise to learn more about the computer keyboard, the functions of each key, and the magazine’s or book’s “listing conventions.” Listing conventions are ways in which publications circumvent the problem of characters and symbols which are not easily reproduced in print. Certain keys on computer keyboards do not have corresponding characters on the printers which are used to generate the program listings. An example of listing conventions can be found in the back of this magazine; refer to “How To Type In COMPUTE!’s Gazette Programs.”
To understand why this is so important, take a look at one of the programs listed in the back of this issue. Simply typing in lines of letters and numbers may not seem so difficult, but what happens when you’ve typed in a program and it won’t run right? Sometimes you will get an error message that reads “?SYNTAX ERROR AT LINE —“. Then you can LIST that line and find your typing error. Other times, however, a program will begin to run, yet fail to operate correctly. How do you know where to find your error without proofreading the entire program? Unless you’re a fairly proficient programmer yourself, you may be baffled. The safest procedure is to be extra careful when entering the program, because the few seconds you save by typing too fast could cost you hours of labor when the inevitable errors turn up.
In addition, always save a program on tape or disk before running it for the first time. Sometimes an error will cause the computer to “crash” or “lock up” – everything comes to a screeching halt and the computer ignores your commands. Occasionally you can recover by holding down the RUN/STOP key while pressing RESTORE, but even this won’t rescue you from a true “system crash.” In such cases, the only way to clear the computer is to switch it off and then on again. Of course, this erases any program in memory, and all of your typing is history.
In fact, when typing in a long program, it’s not a bad idea to save it once or twice before you finish. If the unexpected happens – your restless foot kicks the computer’s power cord out of the wall, or a distant thunderstorm knocks out the electricity – most of your work will be preserved. Play it safe and SAVE.
Nobody’s perfect. No matter how careful you are, it’s almost guaranteed that someday you’ll make at least one mistake when typing in a program listing. When you’re puzzled by a program that refuses to run correctly, here are some common things to look for:
• Punctuation errors. In English, sometimes it doesn’t matter if you omit a comma, replace a comma with a semicolon, or substitute a colon for a dash. But BASIC, the computer’s language, is a lot more picky. Punctuation marks are very significant. Type in the program exactly as it’s listed, unless you’re an accomplished programmer yourself and really know what you’re doing.
• Look-alike characters. On many typewriters, you can type an uppercase “O” instead of a zero, or a lowercase “l” instead of a numeral one. Unfortunately, computer keyboards are not nearly so forgiving. Computers detect a keypress by checking for keycode numbers which are unique to each key. No matter how alike the characters look on the screen, the computer will not be fooled. Proofread your program for mistyped O’s, zeroes, l’s, and ones. Also, on some TV sets, the uppercase “B” may resemble an “8”.
• DATA statements. Some programs have DATA statements – lines that begin with the command DATA followed by numbers and/or letters, usually the former. DATA statements are especially critical, because often they are machine language routines converted to decimal numbers. One mistyped digit can mean the difference between a smoothly running program and a program that bombs out. Check these lines carefully.
• Fake RETURNs. After typing each program statement, you must press the RETURN key so the computer will accept the statement and keep it in memory. But occasionally a program line happens to end exactly at the right screen margin. When you type the final character, the blinking cursor automatically jumps down to the next screen line. This may fool you into thinking that you pressed RETURN, or that you don’t have to press RETURN. If you continue to the next statement, the computer never remembers the one you just typed. Always press RETURN after typing each statement, and check faulty programs for missing lines.
If these tips don’t help, try to recruit someone else to check your program. Often another person can find errors that seem invisible to you. Some people find it helpful to proofread the screen while the second person reads the program lines aloud.
Your first hours with a computer can be lots of fun if you’re careful. Keep in mind the adage, “When all else fails, read the instructions.” And above all, exercise patience. Computers can’t take much physical abuse.
Each month, COMPUTE!’s Gazette for Commodore will tackle some common questions we are asked by new VIC-20/Commodore 64 owners and by people shopping for their first home computer.
Q. I recently bought a Commodore disk drive. When I try to save programs on some new blank disks I bought, something goes wrong. The red light on the disk drive starts flashing, and the program is not saved. I’ve tried this with several disks, all brand-new, and none of them work. What is happening?
A. As you probably know, a flashing red light on a Commodore disk drive indicates some sort of error condition. There are several things to check for if you have this problem. Some might seem obvious, but check them anyway.
First, if you have a Commodore 64, make sure you are using a VIC-1541 disk drive. The older VIC-1540 drives – which look identical – will not work with the 64 without special adjustments. The 1540 drives are intended for VIC-20s. The newer 1541 drives work with both computers.
Second, check all the plug connections. Be certain the plugs are firmly seated.
Third, make sure the disk drive is level. We’ve found that some Commodore disk drives are sensitive to this.
Fourth, the disk drive should not be too near the TV set or monitor. This goes for Datassette recorders, cassette tapes, and disks, too. TVs and monitors generate strong magnetic fields which can interfere with disk drives and recorders, and which can erase tapes and disks. Try moving the disk drive or Datassette as far away from the TV as its cord allows. Sometimes it helps to move the storage device to the other side of the TV, because some TVs generate a stronger magnetic field on one side than on the other.
Fifth, examine the floppy disk on which you’re trying to save the program. When you’re holding the disk as if inserting it in the drive, you should see a tiny notch cut into the left side of the protective sleeve. This is a write-enable notch. The notch allows data to be recorded on the disk. If the notch is absent, or covered with a piece of tape, the disk is write-protected. This means the disk drive will read the disk and load programs, but will not allow programs to be saved. Commercial software on disk usually is write-protected so you can’t accidentally erase it. New blank disks should have uncovered notches. Never defeat the write-protection on a disk unless you’re sure you know what you’re doing.
The final problem to check for actually happened to someone we know. The disk drive worked fine with the disk that came with it, but would not save programs on some new blank disks – the drive would stop with the red light flashing. After checking everything else, it turned out the new disks were not formatted. Without going into detail here, formatting is basically a way of preparing a new disk so the disk drive can use it. All new disks must be formatted before their first use. Once a disk is formatted, it need never be formatted again – unless you want to reuse it for some other purpose (formatting completely erases a disk). New blank disks are not sold preformatted because different brands of computers use different disk formats, and the formats usually are incompatible.
To learn how to format a new disk, consult page 15 of the VIC-1541 User’s Manual, or pages 17 and 18 of the VIC-1540 User’s Manual.
Q. Why do I have to press the RETURN key each time I type in a command or a line of a BASIC program?
A. To tell the computer to accept and act on what you’ve typed.
When you type something on the keyboard, even though it appears on the screen, the computer is not aware of anything until you press RETURN. Before pressing RETURN; you arc free to back up the Cursor and make changes to your typing- Pressing RETURN tells the computer to accept the input, and it will respond in one of two ways:
If you do not type a number before the input, the computer will act on the input immediately after you press RETURN. This is called immediate mode or command mode. For example, if you type PRINT “1IELLO” and press RETURN, the computer will immediately print the word HELLO on the .screen, or anything else you’ve typed between the quotation marks. The computer interprets PRINT as an immediate mode command.
But if you type 10 PRINT “HELLO” and press RETURN, nothing happens immediately. The number 10 (or any number up to 63999) tells the computer that what follows is a line of a program.
The computer then interprets PRINT as a program instruction. It will not execute, or carry out, the instruction until you run the program by typing the command RUN (followed, of course, by a RETURN).
