Download Print this page

Atari CX70 Operator's Manual page 28

Light pen

Advertisement

ATARI Light Pen Operator's Manual
The 16K demonstration program is divided into several modules. A
description of the function of each of them is provided following a
general structural description of the program.
General Structural Description of PALLET
The PALLET flowchart (Figure 5) illustrates the basic structure of the
16K version of the program. At the program starti the modes are
initialized. PENMODE is set equal to 3« which puts the pen in DRAW
mode* and PENCOLR is set to 3i
which makes the line drawn blue.
DRAW module (Mod G) is then entered via RESUMODE (Mod D). The four
drawing modes ( Ei F, Oi H> are exited when the pen is positioned
in the menu area. The menu position test is performed at Module I» the
routine that gets X» Y coordinates. If the pen is in the menu section#
GETMODE (Mod J) is executed. This translates the pen position into
the mode desired# and then goes there. If the selection is a change
color command or a function command# it is performed and the previous
drawing mode is resumed via RESUMODE. If the command is a change
drawing mode# the new mode is entered immediately.
There are five possible drawing modes. The number representing the
current mode is stored in the variable PENMODE. There are#
in
addition# four possible color modes. The number representing the
current color is stored in the variable PENCOLR.
Modes are indicated
on the screen by two independent mode indicator bars in the menu field
of the current modes. Mode numbers are assigned as follows:
DRAWING MODE
PENMODE=
COLOR
PENCOLR=
DOT
4
Blue
3
DRAW
3
Green
2
FILL
2
Red
1
ELASTIC
1
ERASE (set to
background color)
0
USER mode
0
Figure 7
Color Mode Numbers
MODULE A (LINE 20)
"Start" calls Module B#
initializes mode to DRAW and color to blue#
calls Module C# then goes to RESUME MODE Module D to begin actual user
input.
ATARI Light Pen Demonstration Program Cassette - 24

Advertisement

loading