EasyManua.ls Logo

Radio Shack TRS-80 X-PAD GT-116 - Painting Box Routine

Radio Shack TRS-80 X-PAD GT-116
65 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
Display
Area
Menu Area
Figure 6. Example of
Color-Coded
Margins
Painting
the
Town,,
. . .er,
Screen
Red
(Blue,
Orange,
etc.)
While
the
following
program
paints
a box,
you'll
be
able
to
see
a small,
pixel-like
"bouncing cursor". This
Cursor
indicates
the current position
of
your
Pen.
(Note:
The
Cursor
is
easiest
to
see when
you
are
in
Screen Set 0.
Change
the
Screen to any
color
except green
to see the
Cursor.)
A
Cursor
is
helpful when
you are
painting
because
you
can
see
where
your Pen is
located.
This
way,
you always
can
see if
the
Pen is "inside"
the figure
you
want
to be
painted.
To paint,
follow
this procedure:
1.
Type
(or
load)
the respective program
(for a box
or
circle)
and
RUN
it.
2.
Draw
the
figure
by
gently
pressing
the Pen's
tip
against the
surface
of
the Display Area to specify
one
diagonal
point
of
the
box,
Then press the Pen
down
on
another
point
to
specify
the
other
corner.
The box will
be
created
when the second
point
is
specified.
3.
Press the
Pen
in
the margin
area
that's been
defined
as the color
you
want. You can
see
where the Pen
is
currently
located
by
the
position
of
the
Cursor
on
the
Screen
(only in
PMODE
1).
4.
Press
the Pen
inside
the
figure
for painting
to
begin.
(Note:
It
must
be
inside
the
figure
or you'll
paint
the
background.)
5.
To
paint the
background,
move
the
Pen
to a
margin
and
press
slightly.
Then
move
the Pen to the
background (which
surrounds
your figure) and press
down again.
The
background
is
now painted in
the
color
you chose!
Painting
Box Routine
10
20
30
40
50
60
70
8(?
100
110
120
130
140
150
1G0
170
180
190
200
210
220
230
2£lfc
250
260
270
PMDDE
3 >1
PCLS
SCREEN
1
>
GOSUB 400
IF S
=
7 OR
GOSUB
300
IF S<>3
T
IF Y>191
PSETOUY*
IF
PEEKCS
GOSUB
400
GOSUB
300
IF
S<>3
T
LINEOU ,Y
IF
PEEK
(6
GOTO
40
IF
S=ll
T
IF X<128
O3:G0T0
O2:G0TD
C=4:GQT0
PCLS:GOT0
IF
PEEKtG
GOSUB
*100
GOSUB
300
IF S-7 OR
IF S<>3 T
sREM
PAINT
PROGRAH
S=l!
THEN
GOTO
170
HEN 40
THEN 220
8) :X1=X:Y1=Y
5376)=3 THEN
100
HEN
110
1)-(X*Y)
fPSET
iB
5378)=3
THEN 150
HEN
210
THEN
200
230
230
230
40
5378)=3
THEN
230
S=ll THEN 170
HEN 240
26