Download Print this page

Atari CX70 Operator's Manual page 34

Light pen

Advertisement

ATARI Light Pen Operator's Manual
Figure 9
Television Screen Display for Programming Example 1
Try other points on the screen. More points will be plotted as long as
you stay within the boundaries of Graphics Mode 23.
NOTE: If you place the pen outside of the OR. 23 central boundaries/
you will get an "ERROR 3 on LINE 10. " Press CS/RESETl. Notice
the area of the black border. This ^is the area the light pen
cannot use even though this area is not visible in Graphics Mode
23. To mark these boundaries by drawing a border> add line:
15 PLOT 0, O-.DRAWTO 159. 0:DRAWT0 159. 95: DRAWTO 0, 95: DRAWTO 0.0
Now when you press the light pen to the screen, stay inside the
boundaries.
You could
use a TRAP statement at line 55 as
follows:
55 TRAP 20
to prevent an error. If the PLOT statement results in an error,
the program will resume operation at line 20.
Programming Example 1 may also be used with Graphics Mode 7i however,
you cannot plot in the text window area at the bottom of the
television screen.
How Programming Example 1 Works
At line 10. the background color is set and the color used for the
plotting is established. Refer to Tables 9.3 and 9.5 of the ATARI
Using the Light Pen with ATARI BASIC - 30

Advertisement

loading