This sets the background to yellow, and then clears the whole graphics screen
to that colour. All GCOL numbers greater than 127 change the background
colour.
RUN the program again after editing line 10 to be:
10 MODE 130
Mode 130 is a low-resolution mode giving much thicker lines, but up to eight
colours can be displayed simultaneously, along with eight pairs of flashing
colours.
Note that GCOL 0,2 gives green and not yellow in this mode. The numeric
references to colour are not the same in all the graphics modes. You must refer
to Appendix 1 for the correct GCOL number to produce a particular colour.
In mode 130, GCOL 0 can be followed by any number from 0 to 15 to select a
colour. Try changing the GCOL statements to see its effects.
The PLOT command
The PLOT command is an all-purpose drawing command. MOVE and DRAW
are special examples of PLOT. Because moving and drawing are used so
frequently, the PLOT commands that produce these effects have been given
equivalent keywords:
PLOT 4,100,100 is the same as MOVE 100,100
PLOT 5,800,100 is the same as DRAW 800,100
The first number after PLOT decides how the lines are plotted. PLOT
commands enable rectangles, parallelograms, circles, segments, sectors, arcs,
triangles or ellipses to be drawn in outline, solid colour or patterned. You have
seen this demonstrated in the Welcome software. A program to draw a solid
rectangle is:
10 MODE 129
15 REM move to one corner of rectangle
20 MOVE 100, 100
25 REM move to diagonally opposite corner
30 PLOT 101,800,900
C 16