Commodore — Commodore Business Machines PET 2001

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. the first thing to do." The ? tells PET to print, and the quotes tell PET to print a MESSAGE.

Now type Ili I The number 1 tells PET "This is RETURN I .'VOTE: Do not press Your PT,-Twill think you've,finished, it will not understand and I at an t^ time in this exercise. (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 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. 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. Now type N E W The Cursor should be in the left part of your screen when you've done all the above. Stop when you reach the line containing the word "NEW," because you don't want that word included in your program. Using the Exercise 4 - Creating a program key, move the cursor down the screen until it is below 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.

the word "READY." Would you believe you've just created a computer program? 7 9