Trailing-Edge
-
PDP-10 Archives
-
decuslib20-03
-
decus/20-0087/lan3.bas
There is 1 other file named lan3.bas in the archive. Click here to see a list.
00010 ' LAN3
00020 ' DUANE MOORE D I G I T A L
00030 ' READS THE FILE GAIN.LAN AND SELECTED FUNCTIONS ARE PLOTTED
00040 ' ON THE TTY. SCALES ARE LOG FOR AV, AI, AND G, IF
00050 ' SO SELECTED. SCALING IS AUTOMATIC IF SO SELECTED.
00060 '
00070 MARGIN 120
00080 DIM X(5),G(21)
00090 FILES GAIN.LAN,LAN.BAK
00100 SCRATCH #2
00110 MAT S=ZER(5)
00120 PRINT
00130 PRINT "TYPE H FOR HELP"
00140 PRINT "*";
00150 INPUT A$
00160 IF A$="SYS" GOTO 3260
00170 IF A$="DIS" GOTO 350
00180 IF A$="H" GOTO 620
00190 IF A$="TABLE" GOTO 360
00200 IF A$="YPARAM" GOTO 410
00210 IF A$="G" GOTO 480
00220 IF A$="AV" GOTO 500
00230 IF A$="ZIN" GOTO 520
00240 IF A$="AI" GOTO 540
00250 IF A$="ZOUT" GOTO 560
00260 IF A$="AVSL" GOTO 580
00270 IF A$="STA" GOTO 600
00280 IF A$="EXIT" GOTO 3260
00290 IF A$="DB" GOTO 420
00300 IF A$="F" GOTO 440
00310 IF A$="LIN" GOTO 460
00320 IF A$="AUTO" GOTO 370
00330 IF A$="SEL" GOTO 390
00340 GOTO 130
00350 CHAIN LAN,200
00360 CHAIN LAN4
00370 LET S(2)=0
00380 GOTO 140
00390 LET S(2)=1
00400 GOTO 140
00410 CHAIN LAN17
00420 LET S(0)=1
00430 GOTO 140
00440 LET S(1)=12
00450 GOTO 140
00460 LET S(0)=0
00470 GOTO 140
00480 LET P9=20
00490 GOTO 840
00500 LET P9=4
00510 GOTO 840
00520 LET P9=2
00530 GOTO 840
00540 LET P9=0
00550 GOTO 840
00560 LET P9=6
00570 GOTO 840
00580 LET P9=8
00590 GOTO 840
00600 LET P9=18
00610 GOTO 840
00620 PRINT
00630 PRINT "COMMAND","DESCRIPTION"
00640 PRINT "AV","VOLTAGE GAIN PLOT"
00650 PRINT "AI","CURRENT GAIN PLOT"
00660 PRINT "AVSL","VOLTAGE GAIN (TAKING INTO ACCOUNT SOURCE AND LOAD) PLOT"
00670 PRINT "G","POWER GAIN"
00680 PRINT "ZIN","INPUT IMPEDANCE PLOT"
00690 PRINT "ZOUT","OUTPUT IMPEDANCE PLOT"
00700 PRINT "STA","PLOT OF LINVILL AND STERN STABILITY FACTORS"
00710 PRINT "LIN","ORDINATE IS LINEAR*"
00720 PRINT "DB","ORDINATE IS IN DB"
00730 PRINT "F","LABEL FREQUENCY"
00740 PRINT "AUTO","AUTOMATIC ORDINATE SCALING*"
00750 PRINT "SEL","SELECT ORDINATE SCALE FACTORS"
00760 PRINT "YPARAM","PLOT OF THE Y PARAMETERS OF THE NETWORK"
00770 PRINT "TABLE","OUTPUT DATA IN TABULAR FORM"
00780 PRINT "EXIT","EXIT BACK TO BASIC"
00790 PRINT "DIS","RETURN TO DISPATCHER"
00800 PRINT
00810 PRINT ,"* INITIAL CONDITION."
00820 PRINT
00830 GOTO 140
00840 LET G(21)=0
00850 GOTO 2490
00860 IF END #1, GOTO 1020
00870 INPUT #1,X(0),X(1),X(2),X(3),X(4),X(5)
00880 PRINT
00890 INPUT #1,F
00900 IF F<0 GOTO 970
00910 FOR I=0 TO 17
00920 INPUT #1,G(I)
00930 NEXT I
00940 INPUT #1,G(20),G(18),G(19)
00950 GOSUB 2940
00960 GOTO 890
00970 INPUT #1,A$
00980 GOSUB 1040
00990 RESTORE #2
01000 SCRATCH #2
01010 GOTO 860
01020 RESTORE #1
01030 GOTO 140
01040 MAT Q=ZER(61)
01050 RESTORE #2
01060 GOTO 2060
01070 RESTORE #2
01080 IF S(2)=0 GOTO 3080
01090 PRINT "'*' RANGES FROM "Y0"TO "Y1
01100 PRINT "'+' RANGES FROM "Z0"TO "Z1
01110 PRINT "OK";
01120 INPUT Z9$
01130 IF Z9$="Y" GOTO 1190
01140 IF Z9$="YES" GOTO 1190
01150 IF Z9$="1" GOTO 1190
01160 PRINT "ENTER VALUES OF *(MIN),*(MAX),+(MIN),+(MAX)";
01170 INPUT Y0,Y1,Z0,Z1
01180 GOSUB 2450
01190 IF Y0<>Y1 GOTO 1270
01200 IF Y0=0 GOTO 1240
01210 IF Y0>0 GOTO 1260
01220 LET Y1=0
01230 GOTO 1270
01240 LET Y1=1
01250 GOTO 1270
01260 LET Y0=0
01270 IF Z0<>Z1 GOTO 1350
01280 IF Z0=0 GOTO 1320
01290 IF Z0>0 GOTO 1340
01300 LET Z1=0
01310 GOTO 1350
01320 LET Z1=1
01330 GOTO 1350
01340 LET Z0=0
01350 PRINT TAB(22+S(1))"***"D$"***"
01360 PRINT
01370 LET M2=Y0
01380 GOSUB 2340
01390 PRINT TAB(S(1)) M2 TAB(20+S(1));
01400 LET M2=Y1
01410 GOSUB 2340
01420 PRINT B$,"'*'"TAB(56+S(1))M2
01430 PRINT
01440 IF P9=20 GOTO 1520
01450 LET M2=Z0
01460 GOSUB 2340
01470 PRINT TAB(S(1)) M2 TAB(20+S(1));
01480 LET M2=Z1
01490 GOSUB 2340
01500 PRINT C$,"'+'"TAB(56+S(1))M2
01510 IF S(1)=0 GOTO 1530
01520 PRINT " FREQ (HZ)";
01530 GOSUB 1900
01540 LET L=0
01550 IF END #2,GOTO 2390
01560 INPUT #2,F,Y,Z
01570 LET Q0=INT(60*(Y-Y0)/(Y1-Y0)+.5)+1
01580 IF Q0>61 GOTO 1600
01590 IF Q0>0 GOTO 1610
01600 LET Q0=0
01610 LET Q(Q0)=1
01620 LET Q1=INT(60*(Z-Z0)/(Z1-Z0)+.5)+1
01630 IF Q1>61 GOTO 1650
01640 IF Q1>0 GOTO 1660
01650 LET Q1=0
01660 LET Q(Q1)=2+Q(Q1)
01670 LET Q2=Q1
01680 IF Q2>Q0 GOTO 1700
01690 LET Q2=Q0
01700 GOSUB 1960
01710 PRINT TAB(S(1));
01720 FOR I=1 TO Q2
01730 LET Q=Q(I)
01740 IF Q=0 GOTO 1840
01750 IF Q=1 GOTO 1820
01760 IF P9=20 GOTO 1840
01770 IF Q=2 GOTO 1800
01780 PRINT "O";
01790 GOTO 1850
01800 PRINT "+";
01810 GOTO 1850
01820 PRINT "*";
01830 GOTO 1850
01840 PRINT " ";
01850 NEXT I
01860 PRINT
01870 LET Q(Q0)=0
01880 LET Q(Q1)=0
01890 GOTO 1550
01900 PRINT TAB(S(1)) " I";
01910 FOR I=1 TO 6
01920 PRINT ".........I";
01930 NEXT I
01940 PRINT
01950 RETURN
01960 IF INT(L/10)=L/10 GOTO 2020
01970 IF S(1)=0 GOTO 1990
01980 PRINT F;
01990 PRINT TAB(S(1))".";
02000 LET L=L+1
02010 RETURN
02020 IF S(1)=0 GOTO 2040
02030 PRINT F;
02040 PRINT TAB(S(1))"-";
02050 GOTO 2000
02060 LET Y0=1E35
02070 LET Z0=Y0
02080 LET Y1=-1E35
02090 LET Z1=Y1
02100 IF END #2,GOTO 1070
02110 INPUT #2,X,Y,Z
02120 IF Y>Y0 GOTO 2140
02130 LET Y0=Y
02140 IF Y<Y1 GOTO 2160
02150 LET Y1=Y
02160 IF Z>Z0 GOTO 2180
02170 LET Z0=Z
02180 IF Z<Z1 GOTO 2200
02190 LET Z1=Z
02200 GOTO 2100
02210 LET M2=Y0
02220 GOSUB 2340
02230 LET Y0=M2
02240 LET M2=Y1
02250 GOSUB 2340
02260 LET Y1=M2
02270 LET M2=Z0
02280 GOSUB 2340
02290 LET Z0=M2
02300 LET M2=Z1
02310 GOSUB 2340
02320 LET Z1=M2
02330 GOTO 1280
02340 IF M2=0 GOTO 2380
02350 LET M3=ABS(M2)
02360 LET M1=10^(INT(LOG(M3)/LOG(10)))
02370 LET M2=INT(100*M2/M1+.5)*M1/100
02380 RETURN
02390 GOSUB 1900
02400 PRINT
02410 PRINT
02420 PRINT ,"RESISTANCE","CAPACITANCE","INDUCTANCE"
02430 PRINT "SOURCE",X(0),X(1),X(2)
02440 PRINT "LOAD",X(3),X(4),X(5)
02450 PRINT
02460 PRINT
02470 PRINT
02480 RETURN
02490 IF P9=4 GOTO 2600
02500 IF P9=2 GOTO 2640
02510 IF P9=0 GOTO 2660
02520 IF P9=6 GOTO 2700
02530 IF P9=8 GOTO 2820
02540 IF P9=18 GOTO 2780
02550 IF P9=20 GOTO 2720
02560 LET B$=""
02570 LET C$=""
02580 LET D$=""
02590 GOTO 860
02600 IF S(0)=0 GOTO 2900
02610 LET D$="LOGARITHMIC VOLTAGE GAIN"
02620 LET B$="MAGNITUDE (DB)"
02630 GOTO 2920
02640 LET D$="INPUT IMPEDANCE"
02650 GOTO 2910
02660 IF S(0)=0 GOTO 2880
02670 LET D$="LOGARITHMIC CURRENT GAIN"
02680 LET B$="MAGNIUTDE (DB)"
02690 GOTO 2910
02700 LET D$="OUTPUT IMPEDANCE"
02710 GOTO 2910
02720 LET D$="POWER GAIN"
02730 LET B$="G (DB) "
02740 LET C$=""
02750 IF S(0)<>0 GOTO 860
02760 LET B$="G "
02770 GOTO 860
02780 LET D$="STABILITY FACTORS"
02790 LET B$="LINVILL "
02800 LET C$="STERN "
02810 GOTO 860
02820 IF S(0)<>0 GOTO 2850
02830 LET D$="VOLTAGE GAIN (SOURCE-LOAD)"
02840 GOTO 2910
02850 LET D$="LOGARITHMIC VOLTAGE GAIN (SOURCE-LOAD)"
02860 LET B$="MAGNITUDE (DB)"
02870 GOTO 2920
02880 LET D$="CURRENT GAIN"
02890 GOTO 2910
02900 LET D$="VOLTAGE GAIN"
02910 LET B$="MAGNITUDE"
02920 LET C$="PHASE "
02930 GOTO 860
02940 IF P9=0 GOTO 3000
02950 IF P9=8 GOTO 3000
02960 IF P9=4 GOTO 3000
02970 IF P9=20 GOTO 3030
02980 PRINT #2,F,G(P9),G(P9+1)
02990 RETURN
03000 IF S(0)=0 GOTO 2980
03010 PRINT #2,F,20*CLOG(G(P9)),G(P9+1)
03020 RETURN
03030 IF S(0)=0 GOTO 2980
03040 PRINT #2,F,10*CLOG(G(P9)),G(P9+1)
03050 RETURN
03060 PRINT #2,F,10*CLOG(G(P9)),G(P9+1)
03070 RETURN
03080 IF S(0)=0 GOTO 1190
03090 IF P9=0 GOTO 3140
03100 IF P9=4 GOTO 3140
03110 IF P9=8 GOTO 3140
03120 IF P9=20 GOTO 3140
03130 GOTO 1190
03140 LET Y1=(INT((Y1-.01)/5)+1)*5
03150 LET Y2=Y0
03160 LET Y0=Y1-15
03170 IF Y1-Y2<15.01 GOTO 3230
03180 IF Y1-Y2<30.01 GOTO 3220
03190 IF Y1-Y2<60.01 GOTO 3210
03200 LET Y0=Y0-60
03210 LET Y0=Y0-30
03220 LET Y0=Y0-15
03230 LET Z0=0
03240 LET Z1=360
03250 GOTO 1190
03260 END