in the example programs that follow, all references to a particular mode apply
equally well to its lower-numbered counterpart.
Modes 128, 129, 130, 132 and 133 are known as graphics modes because they
allow the use of both text and graphics. Modes 131 and 134 are text-only
modes. Mode 135 allows the use of graphics, but the commands involved are
very different and so are dealt with in a separate section beginning on page (361.
In each of the graphics modes, points on the screen are given coordinates so
that their position can be identified.
The point A in the figure has coordinates 640 across and 512 up, roughly the
middle of the screen. The point B is at position 100,800 and C is at 1000,20.
Type in and run this program:
10 MODE 128
20 MOVE 1900100
30 DRAW 800,100
40 DRAW 800,900
50 DRAW 100,100
Line 10 changes to a graphics mode, and as a result the invisible graphics
cursor is automatically positioned at point 0,0 -- the bottom left comer of the
graphics screen.
Line 20 causes the computer to move to 100,100 without drawing a line.
The DRAW command draws a line from the last point visited (which was
100,100) to 800,100. The remaining DRAW commands produce a series of
joined lines making a triangle.
C 1 4