Download Print this page

Atari CX70 Operator's Manual page 30

Light pen

Advertisement

ATARI Light Pen Operator's Manual
MODULE G (LINE 350)
Enter DRAW fltode> drawing mode 3 (PENM0DE=3). A preliminary point is
fetched (line 352) and a loop consisting of getting coordinates and
drawing to them is executed. Note that if line 352 is deleted/ a point
will be fetched (line 360) and a BASIC DRAWTO will be performed to
that point. But the DRAWTO draws from the last pixel plotted on the
screen. So if line 352 is deleted/ the last point plotted will be the
mode indicator bar and line 380 will connect the current pen position
to the mode bar.
MODULE H (LINE 400)
Enter DOT mode/ drawing mode 4 (PENM0DE=4). This is the most simple
drawing mode. A loop is entered which plots each X/ Y position.
MODULE I (LINE 2000)
GETPOS waits until the pen tip is pressed (line 2010)/ calls the
PENBUF machine language routine (line 2020)/ and retrieves the X and V
values (line 2040). If the pen is out of GRAPHICS Mode 23 (GRAPHICS
7+16 to eliminate the text window) boundaries/ the above process is
repeated (line 2005). If the pen is in the menu section of the video
screen/
the BASIC return address is removed from the stack (via the
POP command) so a proper GOTO can be performed (line 2048) since
GETPOS is called by a GOSUB. In this case/ control is transferred to
Module J. If the pen is not in the menu section# execution returns to
the calling routine# with the variable X and V containing the latest X
and Y positions read from the pen registers# representing the current
pen position.
MODULE J (LINE 100)
GETMODE is entered only from Module I# and only when the pen is in the
menu section of the screen (line 2048). It first pokes location 77 to
stop the operating system from entering the automatic monitor-
preserving "attract mode" (line 105). It assumes the user will make a
menu selection at least once each 9 minutes.
If the attract mode ever
begins# just place the pen in the menu section to restore normal
activity. (Attract mode is the mode you see after leaving your
computer for awhile# when the colors start changing on your
television screen. )
After line 105#
Module J converts the Y coordinate into the correct
menu selection (line 110). Module K is called to move the mode
indicator bars (line 120). The program waits at line 125 for the pen
to be lifted to prevent entering GETMODE over and over if the pen is
held in the menu area. Then activity is directed to the module
indicated by the pen location (line 130).
ATARI.Light Pen Demonstration Program Cassette - 26

Advertisement

loading