EasyManua.ls Logo

Radio Shack TRS-80 X-PAD GT-116 - Page 63

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...
3160
REM
ROUTINE
TO
DISPLAY
31
7
£ REM A
VERTICAL
RESISTOR
31SSJ
REM
***********************
3190
GQSUB 2870: IF
S<>3
THEN
GOSUB
540
r
GOTO
3190
3200
SN=6;A=5
3210
LINE(X
f
Y)-(X,Y>A)
f
PSET:Y=Y+A
3220
FOR I*1TO10
3230
Xl=X;Yl=YtY.^-v2
3240
IF
I
HOD 2
-
THEN SN=-SN
3250
X=X+SN
3260
LINECX1,Y1)-(X,Y)
r
PSET
3270
NEXT I
32B0 LINEtX,YV-tX,Y+M
,PSET
3290
RETURN
3300
REM
***********************
3310
REM ROUTINE TO
DISPLAY
3 320
REM A
HORIZONTAL
CAPACITOR
3530
REM
*"*
*
*
********** *
***
*****
3340
GOSUB 28
70
;
IF
SO
3
THEN
GOSUB
540
:
GOTO
33
40
3350
A=5
3360
LINE(X-2*A,Y+A)-(X+2*A, Y+A> ,PSET
3
370
LINE<X-2*A,Y+2*A)-(X+2*A
F
Y+2*A),PSET
33&0
LIflEtX,Y)-tX,?+A),P5ET
3390
LINE(X,Y+2*A)-(X
F
Y+3*A>
,PSET
3400
RETURN
3410
REM
***********************
3420
REM
ROUTINE
TO
DISPLAY
3430
REM A
VERTICAL CAPACITOR
3440
REM
***********************
3450
GOSUB
2870: IF S<>3 THEN GOSUB 540 :
GOTO
3450
3460
A=5
3470
LINE(X+A,Y-A)-(X+A,Y+A)
r
PSET
3480
LINE(X+2*A,Y-A}~CX+2*A,¥+A)
,PSET
3490
LINE(X,Y>-(X+A,Y),PSET
3500
LlNE{X+2*A
f
YJ-(X+3*A,Y>,PSET
3510
RETURN
35 20
REM
***********************
35 30
REM ROUTINE TO DISPLAY
35 40
REM A
TRANSISTOR
SYMBOL
3550
REM
***********************
3560
GOSUB
2870: IF S<>3 THEN GOSUB
540;
GOTO
3560
3570
A=10
3580
LINE(X,Y)-(X+2*A,Y)
,PSET
3590
LINE<X+2*A,Y-A)-(X+2*Ar
Y+A>
,FSET
3600
LINE(X+2*A,Y+A/3
)-
(X+4*A,
Y+2*A
J
,PSET
3610
LINE(X+2*A,Y-A/3)-U+4*A,Y-2*A),FSET
36 20
RETURN
3630
REM
SIDE
BOX
IDENTIFICATION
3640
SW=0:MU=0
3650
BX=INT(Y/19.2)+1
3660
PLAY
STR$(BXJ
3670
IF
PEEK (65378)^7
THEN
3670
3680
ON BX
GOTO
3040,3190,3340,3450,3560,3620
3690
RETURN
The
Sample
Program
uses X-data, Y-data,
and
Pen
Status
data
for
program
control.
Pen
Status is a number from
to
15. There
are
four
switches that
determine
the
value
of
S.
Each
switch
can
be
OFF
or
ON.
means
the
switch
is
OFF,
For
example,
means
the
Pen
is
not
within
2"
of
the
Surface
,
the
Pen
is
not
within
about
1"
of
the
Left
or
Right
Margin
or
within
approximately
1"
of
the
top
margin, etc.
1
means
the
switch is
ON,
indicating
that
the Pen is
within about
1"
of
some
margin,
or
within
2"
of the
Surface etc.
Pen
Status
Table
s
Top
Margin
L/R
Margin
Proximity
Pen
Switch
1
1
2 1
3
1
1
4
1
o
!
5
1
1
6
1 1
7
1 1
1
8
1
9
1 1
10
1
1
11
1
1
1
12
1 1
13
1
1
1
14 1
1 1
15 1
1 1 1
Top
Margin
When
the
Pen
is
within
about
l'
f
of
the
top
margin,
this
switch
is
set
(1),
56