![background image](http://html1.mh-extra.com/html/commodore/pet-2001-series/pet-2001-series_introduction-manual_2643397007.webp)
7
9
So let's turn each line of the picture into a program step and see
what happens.
The importance of a program to a computer can be likened to
the importance of a driver to a car. The car does nothing with-
out a driver and the computer does nothing without a program.
A program is stored as a list of steps or instructions in PET's
memory. Before we can create a program in its memory, we
should make PET forget about any previous program. This is
what we did when we typed the word NEW. Use the command
any time You want to enter a ,NEW program.
Now type
Ili
I
RETURN
I
The number 1 tells PET "This is
.'VOTE: Do
not
press
Your PT,-Twill think you've,finished, it will not understand and
the first thing to do." The ? tells PET to print, and the quotes tell
PET to print a MESSAGE.
(If you make an error, do not try to correct it. Instead
press (
RETURN
I,
then move the cursor up and type the correct
number, the question mark, and the quotes. Then press
I at an t^ time in this exercise.
If this happens. first clear the screen again and start over.
When your rocket is complete, move the cursor to the left edge
of the screen at line 10.
Now type
N E W
The Cursor should be in the left part of your screen when you've done
all the above.
Exercise 4 - Creating a program
When you have finished this exercise, you will have drawn a pic
ture on the screen. You probably went to a lot of work to create this
picture. You'd like to preserve it so you can view it again.
Notice that the only thing that changed has been the number (1 , 2,
3 and 4) that tells PET "this is the th thing to do." So now tell PET
the 5th, 6th. 7th, 8th, and 9th things to do, just like we've done with
the first four. Be sure to keep the numbers in the right sequence.
Stop when you reach the line containing the word "NEW," because you
don't want that word included in your program. Using the
key, move the cursor down the screen until it is below
the word "READY." Would you believe you've just created a
computer program?