EasyManua.ls Logo

Radio Shack TRS-80 X-PAD GT-116 - 8; Circling the Landing X-Pad; Circle 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...
8/
Circling
the
Landing
X-Pad
There are three easy steps in drawing a circle with your
X-Pad:
1. Type (or load from cassette) the circle program and
RUN it.
2. Place the Pen where you want the circle's centerpoint
to be (the centerpoint is the middle of a circle) and
press down on the Pen.
3.
Lift the Pen and move it to a place away from the
centerpoint, then lower it and press down. The
distance from the centerpoint to this
point is
the
circle's
radius.
The
X-Pad draws the circumference of
the circle
around
the radius. (The
radius is the
distance between the centerpoint and the
ci rcumference
.
)
Circle Routine
10
PMDDE
4*1
20 PCLS
3d SCREEN 1 *1
GOSUB 150
IF
S<>3 THEN 40
Gtf PSET(X tY*l>
7tf IF PEEK(G5378)=3 THEN GOTO
80
X1=X:Y1=Y
90 GOSUB 150
100 IF S 03 THEN GOTO 90
110 L=ABS<Xl-X)+i:C=ABS(Yl-Y)+l
=SQR(
CL*L)+CC*C) )
115 REM COMPUTES
CIRCLE'S
SIZE
120 CIRCLE <X1 ,Y1 ) ,R
130
IF
PEEK<G537B)=3
THEN 130
140
GOTO
40
150
X=PEEK(S537S)
:Y= PEEK < 65377)
:S=PEEK(G537B)sRETURN
70
23