Commodore — Commodore Business Machines PET 2001

Exercise 14 - Animating your PET It's easy to move an object smoothly across the CRT, thanks to PET's programmable cursor controls. The listings below give you the fun- damental right-left-up-down motions. Later we will show you how to program an unidentified flying object. Move a ball right & left across the screen. (Note: all symbols are shown as they appear on screen.) Using your cassette to save a program After the effort of entering and debugging your BASIC program, you may want to save it on cassette tape for later use. Place a blank cassette in the recorder unit, and press "REW" to be sure the tape is fully rewound. When rewinding is complete, press " STOP" on the cassette unit.

You are ready now to save your program. It's a good idea to save your program by name. Having completed the rocketship drawing and converted it to a program, let's save it, using the name "ROCKETSHIP." Type SAVE "ROCKETSHIP" and pass RETURN . PET will display: Note: While "cursor up" character and "ball" character (the shifted " Q" character) look alike, they obviously perform quite different functions as you will perceive ... provided you press the right key. 70 NEXT 80 GOTO 20 And, of course, moving a ball diagonally across the screen (top left to bottom right) Press the correct buttons, and the display reads:

Now, when PET is ready, and the cursor flashes, you should rewind the tare and verify that your program really did get saved. When the tan, is fully rewound tune the word VERIFY and press PET will tell you which cassette unit button to press. Do so, and PET will assure you it is VERIFYING. Then, when PET is READY, you now can be sure your tape has an accurate copy of your program. 30 'filter you type, in sequence, a q uotation mark and a cursor key, you'll see a symbol appear to indicate the cursor movement or action. This is a guide to these symbols: 31