Google
 

Trailing-Edge - PDP-10 Archives - decuslib10-04 - 43,50353/lan4.bas
There is 1 other file named lan4.bas in the archive. Click here to see a list.
00010 ' LAN4
00020 ' DUANE MOORE    D I G I T A L
00030 ' READS THE FILE GAIN.LAN AND SELECTED FUNCTIONS ARE LISTED
00040 ' IN A TABLE ON THE TTY.
00050 '
00060 DIM X(5),G(21)
00070 FILES GAIN.LAN,LAN.BAK
00080 SCRATCH #2
00090 LET S1=0
00100 PRINT
00110 PRINT "TYPE H FOR HELP"
00120 PRINT "*";
00130 INPUT A$
00140 IF A$="SYS" GOTO 340
00150 IF A$="DIS" GOTO 290
00160 IF A$="H" GOTO 500
00170 IF A$="EXIT" GOTO 340
00180 IF A$="YPARAM" GOTO 350
00190 IF A$="G" GOTO 360
00200 IF A$="AV" GOTO 380
00210 IF A$="ZIN" GOTO 400
00220 IF A$="AI" GOTO 420
00230 IF A$="ZOUT" GOTO 440
00240 IF A$="AVSL" GOTO 460
00250 IF A$="STA" GOTO 480
00260 IF A$="DB" GOTO 300
00270 IF A$="LIN" GOTO 320
00280 GOTO 110
00290 CHAIN LAN,200
00300 LET S1=1
00310 GOTO 120
00320 LET S1=0
00330 GOTO 120
00340 STOP
00350 CHAIN LAN13
00360 LET P9=20
00370 GOTO 650
00380 LET P9=4
00390 GOTO 650
00400 LET P9=2
00410 GOTO 650
00420 LET P9=0
00430 GOTO 650
00440 LET P9=6
00450 GOTO 650
00460 LET P9=8
00470 GOTO 650
00480 LET P9=18
00490 GOTO 650
00500 PRINT
00510 PRINT "COMMAND","DESCRIPTION"
00520 PRINT "AV","VOLTAGE GAIN "
00530 PRINT "AI","CURRENT GAIN "
00540 PRINT "AVSL","VOLTAGE GAIN (TAKING INTO ACCOUNT SOURCE AND LOAD) "
00550 PRINT "ZIN","INPUT IMPEDANCE "
00560 PRINT "ZOUT","OUTPUT IMPEDANCE "
00570 PRINT "G","POWER GAIN"
00580 PRINT "STA","LINVILL AND STERN STABILITY FACTORS"
00590 PRINT "DB","MAGNITUDE IN DB"
00600 PRINT "LIN","MAGNITUDE IN UNITS"
00610 PRINT "YPARAM","Y PARAMETERS OF THE NETWORK"
00620 PRINT "EXIT","EXIT BACK TO BASIC"
00630 PRINT "DIS","RETURN TO DISPATCHER"
00640 GOTO 120
00650 LET G(21)=0
00660 IF END #1, GOTO 830
00670 INPUT #1,X(0),X(1),X(2),X(3),X(4),X(5)
00680 INPUT #1,F
00690 IF F<0 GOTO 770
00700 FOR I=0 TO 17
00710 INPUT #1,G(I)
00720 NEXT I
00730 INPUT #1,G(20),G(18),G(19)
00740 LET G(21)=0
00750 PRINT #2,F,G(P9),G(P9+1)
00760 GOTO 680
00770 INPUT #1,A0$
00780 RESTORE #2
00790 GOSUB 850
00800 RESTORE #2
00810 SCRATCH #2
00820 GOTO 660
00830 RESTORE #1
00840 GOTO 120
00850 PRINT
00860 PRINT ,"*** "A$" ***"
00870 PRINT
00880 PRINT,"RESISTANCE","CAPACITANCE","INDUCTANCE"
00890 PRINT "SOURCE",X(0),X(1),X(2)
00900 PRINT "LOAD",X(3),X(4),X(5)
00910 PRINT
00920 IF P9=18 GOTO 1190
00930 PRINT "FREQUENCY","MAGNITUDE";
00940 IF S1=0 GOTO 1010
00950 IF P9=0 GOTO 1000
00960 IF P9=4 GOTO 1000
00970 IF P9=8 GOTO 1000
00980 IF P9=20 GOTO 1000
00990 GOTO 1010
01000 PRINT " (DB)";
01010 PRINT ,"  PHASE","REAL PART","IMAG PART"
01020 IF END #2 GOTO 1240
01030 INPUT #2,F,A,B
01040 LET B0=B*3.141592654/180
01050 LET C=A*COS(B0)
01060 LET D=A*SIN(B0)
01070 PRINT  F,
01080 IF S1=0 GOTO 1170
01090 IF P9=20 GOTO 1140
01100 IF P9=0 GOTO 1160
01110 IF P9=4 GOTO 1160
01120 IF P9=8 GOTO 1160
01130 GOTO 1170
01140 LET A=10*CLOG(A)
01150 GOTO 1170
01160 LET A=20*CLOG(A)
01170 PRINT A,B,C,D
01180 GOTO 1020
01190 PRINT "FREQUENCY"," LINVILL","STERN"
01200 IF END #2 GOTO 1240
01210 INPUT #2,F,A,B
01220 PRINT F,A,B
01230 GOTO 1200
01240 PRINT
01250 PRINT
01260 RETURN
01270 END