Commodore 64 User Manual page 69

Hide thumbs Also See for 64:
Table of Contents

Advertisement

Type lines 5 through 40 normally. Your display should look like this:
1
REM AU TOMATIC: COLOR BARE:
5 PRINT CHR$(147)
REM i_HR $(147;'= CLR,-'HOME
113 PRINT CHR$(18 } : "
"; :REM REVERSE BARS
20 CL = I NT *RND 1 +1
30 ON C:L GOTO 40,50,60,70, 80,90,100 .,110
40 PRINT CHR'$<5::' ; CiOTO 10
EDITING NOTES
Use the CRSR-UP key to position the cursor on line 40. Then type 5
over the 4 of 40. Next, use the CRSR-RIGHT key to move over to the 5 in
the CHR$ parentheses. Hit ® rm-M to open up a space and type
'28'. Now just hit i with the cursor anywhere on the line.
The display should now look like this:
1 REM AUTOMATI C COLOR E:ARS
5 PRINT CHR$':: 14 )
REM CHF $ f 14 ::' = CLR:-' HCir1E
10 PRINT CHR$':: 18::' ; . : REM REVER'_.E BAR
20 CL = I NT (=:* RND':: 1 :' )+ 1
:30 ON CL OOTO 40,`U,513 „•0..80,90 101+.110
50 PRINT CHR$ :'2 ::, :: GO TO 10
0
Don't worry. Line 40 is still there. LIST the program and see. Using the
same procedure, continue to modify the last line with a new line number
and CHR$ code until all the remaining lines have been entered. See, we
told you the editing keys would come in handy. As a final check, list the
entire program to make sure all the lines were entered properly before
you RUN it.
Here is a short explanation of what's going on.
You've probably figured out most of the color bar program by now
except for some strange new statement in line 30. But let's quickly see
59

Hide quick links:

Advertisement

Table of Contents
loading

Related Products for Commodore 64

Table of Contents