Commodore VIC-20 User Manual page 108

Hide thumbs Also See for VIC-20:
Table of Contents

Advertisement

c
Line 40 establishes a new loop and sets up line 50, which
(
changes the screen and border colors. C is defined as a series
of numbers from 8 to 255, which increase in increments of 17.
Every time line 70 (NEXT) is hit, 17 is added to the previous
value of C and the sum is used for the new value. This causes a
cycle of colors to be selected including black border with black
screen, white border with white screen, etc., for all 8 border
colors. Then the numbers in C go beyond the values for those
colors and pick 7 different colors for the screen. (See Appendix
I for a list of color numbers)
Line 50 is the statement that actually changes the color.- The
value contained in variable C is stored in memory location
36879. This is actually a location on the VIC chip itself, not in
your normal area of memory.
c
Line 60 is a delay loop. If this line is removed, the colors will
change fast enough to give you a headache.
Line 70 completes the loop started in line 40. Notice that the
line could have read 70 NEXT C, but doesn't have to be that
(
way.
Line 80 sends the program back to cycle through the colors
again. It will run forever, unless you press the STOP key, or turn
off the VIC. Typing POKE 36879, 27 after you hit STOP will
restore the normal colors of the screen.
,-
<
<
(
98

Advertisement

Table of Contents
loading

Table of Contents