Download Print this page

Atari CX70 Operator's Manual page 32

Light pen

Advertisement

ATARI Light Pen Operator's Manual
then calls CIO. Line 800 sets the start adddress to the beginning of
the screen display> and line 820 sets the size of the display memory.
Thus# when CIO is called# it loads "characters" (bytes) from diskette
and puts them into the beginning of the screen memory.
Line 830 calls CIO using a tiny machine language routine stored in
CIO*. The routine is as follows:
PLA
> pop # of parameters
PLA
# pop low byte of parameter
PLA
' pop high byte into A
TAX
>move A to X registers
JMP
CIO
#go to CIO
The X register must contain the lOCB number multiplied by 16. We are
using lOCB 1 (i.e. # OPEN #1) so we pass the integer 16 to the stack#
which is transferred to X. Line 850 erases the plotted dot. Line 870
erases the modebars (which were loaded off diskette and are probably
incorrect)# and then calls SETUP to redraw the menu. Note that SETUP
will not erase because L0D=1 (load flag was set in line 720).
MODULE Q (LINE 750)
The SAVE function first plots a point to indicate that it is saving#
then simulates a carriage return for the cassette save in line 757.
If you are using diskette# delete this line. Line 760 opens the file
for writing# and line 770 sets the CIO command to 11# "Put
Characters." Line 810 sets the start of the CIO read to the start of
the screen memory. Line 820 sets the number of bytes to be saved.
The CIO is called at line 830 (see Module P description) and closed at
line 840. Line 850 erases the indicator dots#
and line 880 calls
RESUMODE Module D to reenter the drawing mode.
MODULE R (LINE 900)
CLEAR SCREEN calls the SETUP routine to blank the entire screen#
set
up the menu again and enter the previous modes.
Beginning with Section 5# the manual will take you through a
step-by-step introduction to programming with the ATARI Light Pen.
A series of programming examples is presented in increasing order
of complexity. The appendices give helpful hints to the advanced
programmer and detailed insights into the programs presented.
ATARI Light Pen Demonstration Program Cassette - 28

Advertisement

loading