Google
 

Trailing-Edge - PDP-10 Archives - decuslib20-03 - decus/20-0087/lan14.bas
There is 1 other file named lan14.bas in the archive. Click here to see a list.
00010 '  LAN14
00020 '  DUANE MOORE    D I G I T A L
00030 '  READS THE FILE GAIN.LAN AND SELECTED FUNCTIONS ARE PLOTTED
00040 '  IN A FILE:  TGRAPH.LAN.  SCALES ARE LOG FOR AV, AI, AND G, IF
00050 '  SO SELECTED.  SCALING IS AUTOMATIC IF SO SELECTED.
00060 '
00070 PRINT "OUTPUT FILE:  TGRAPH.LAN"
00080 PRINT
00090 DIM X(5),G(21)
00100 FILES GAIN.LAN,LAN.BAK,TGRAPH.LAN
00110 MARGIN #3,110
00120 SCRATCH #2,#3
00130 MAT S=ZER(5)
00140 LET S(1)=15
00150 GOSUB 3140
00160 PRINT
00170 PRINT "TYPE H FOR HELP"
00180 PRINT "*";
00190 INPUT A$
00200 IF A$="SYS" GOTO 3620
00210 IF A$="DIS" GOTO 390
00220 IF A$="H" GOTO 640
00230 IF A$="TABLE" GOTO 380
00240 IF A$="G" GOTO 500
00250 IF A$="AV" GOTO 520
00260 IF A$="ZIN" GOTO 540
00270 IF A$="AI" GOTO 560
00280 IF A$="ZOUT" GOTO 580
00290 IF A$="AVSL" GOTO 600
00300 IF A$="STA" GOTO 620
00310 IF A$="EXIT" GOTO 3620
00320 IF A$="DB" GOTO 440
00330 IF A$="NL" GOTO 460
00340 IF A$="LIN" GOTO 480
00350 IF A$="AUTO" GOTO 400
00360 IF A$="SEL" GOTO 420
00370 GOTO 170
00380 CHAIN LAN15
00390 CHAIN LAN,200
00400 LET S(2)=0
00410 GOTO 180
00420 LET S(2)=1
00430 GOTO 180
00440 LET S(0)=1
00450 GOTO 180
00460 LET S(1)=0
00470 GOTO 180
00480 LET S(0)=0
00490 GOTO 180
00500 LET P9=20
00510 GOTO 850
00520 LET P9=4
00530 GOTO 850
00540 LET P9=2
00550 GOTO 850
00560 LET P9=0
00570 GOTO 850
00580 LET P9=6
00590 GOTO 850
00600 LET P9=8
00610 GOTO 850
00620 LET P9=18
00630 GOTO 850
00640 PRINT
00650 PRINT "COMMAND","DESCRIPTION"
00660 PRINT "AV","VOLTAGE GAIN PLOT"
00670 PRINT "AI","CURRENT GAIN PLOT"
00680 PRINT "AVSL","VOLTAGE GAIN (TAKING INTO ACCOUNT SOURCE AND LOAD) PLOT"
00690 PRINT "G","POWER GAIN"
00700 PRINT "ZIN","INPUT IMPEDANCE PLOT"
00710 PRINT "ZOUT","OUTPUT IMPEDANCE PLOT"
00720 PRINT "STA","PLOT OF LINVILL AND STERN STABILITY FACTORS"
00730 PRINT "LIN","ORDINATE IS LINEAR*"
00740 PRINT "DB","ORDINATE IS IN DB"
00750 PRINT "NL","NO LABLING OF PART INCREMENTATION"
00760 PRINT "AUTO","AUTOMATIC ORDINATE SCALING*"
00770 PRINT "SEL","SELECT ORDINATE SCALE FACTORS"
00780 PRINT "TABLE","OUTPUT DATA IN TABULAR FORM"
00790 PRINT "EXIT","EXIT BACK TO BASIC"
00800 PRINT "DIS","RETURN TO DISPATCHER"
00810 PRINT
00820 PRINT ,"*  INITIAL CONDITION."
00830 PRINT
00840 GOTO 180
00850 LET G(21)=0
00860 LET S(4)=0
00870 GOTO 2570
00880 IF END#1 GOTO 1100
00890 INPUT #1,X(0),X(1),X(2),X(3),X(4),X(5)
00900 INPUT #1,F
00910 IF F<0 GOTO 1010
00920 FOR I=0 TO 17
00930 INPUT #1,G(I)
00940 NEXT I
00950 INPUT #1,G(20),G(18),G(19)
00960 LET G(21)=0
00970 IF S(4)=1 GOTO 900
00980 GOSUB 3020
00990 LET S(4)=1
01000 GOTO 900
01010 INPUT #1,A1$
01020 LET S(4)=0
01030 GOTO 880
01040 RESTORE #1
01050 RESTORE #2
01060 SCRATCH #2
01070 LET S(3)=0
01080 LET S(4)=0
01090 GOTO 180
01100 MAT Q=ZER(61)
01110 RESTORE #2
01120 GOTO 2140
01130 RESTORE #2
01140 IF S(2)=0 GOTO 3440
01150 PRINT "'*' RANGES FROM "Y0"TO "Y1
01160 PRINT "'+' RANGES FROM "Z0"TO "Z1
01170 PRINT "OK";
01180 INPUT Z9$
01190 IF Z9$="Y" GOTO 1240
01200 IF Z9$="YES" GOTO 1240
01210 IF Z9$="1" GOTO 1240
01220 PRINT "ENTER VALUES OF *(MIN),*(MAX),+(MIN),+(MAX)";
01230 INPUT Y0,Y1,Z0,Z1
01240 IF Y0<>Y1 GOTO 1320
01250 IF Y0=0 GOTO 1290
01260 IF Y0>0 GOTO 1310
01270 LET Y1=0
01280 GOTO 1320
01290 LET Y1=1
01300 GOTO 1320
01310 LET Y0=0
01320 IF Z0<>Z1 GOTO 1410
01330 IF Z0=0 GOTO 1370
01340 IF Z0>0 GOTO 1390
01350 LET Z1=0
01360 GOTO 1410
01370 LET Z1=1
01380 GOTO 1410
01390 LET Z0=0
01400 IF S(3)=1 GOTO 1620
01410 PRINT #3 TAB(22+S(1))"***"D$"***"
01420 PRINT #3
01430 LET M2=Y0
01440 GOSUB 2420
01450 PRINT#3 TAB(S(1)) M2 TAB(20+S(1));
01460 LET M2=Y1
01470 GOSUB 2420
01480 PRINT#3 B$,"'*'"TAB(57+S(1))M2
01490 PRINT#3
01500 IF P9=20 GOTO 1570
01510 LET M2=Z0
01520 GOSUB 2420
01530 PRINT#3 TAB(S(1))  M2 TAB(20+S(1));
01540 LET M2=Z1
01550 GOSUB 2420
01560 PRINT#3 C$,"'+'"TAB(57+S(1))M2
01570 IF S(1)=0 GOTO 1590
01580 PRINT #3,"  "A0$;
01590 GOSUB 1980
01600 LET L=0
01610 LET S(3)=1
01620 IF END #2,GOTO 2470
01630 INPUT #2,F,Y,Z
01640 LET Q0=INT(60*(Y-Y0)/(Y1-Y0)+.5)+1
01650 IF Q0>61 GOTO 1670
01660 IF Q0>0 GOTO 1680
01670 LET Q0=0
01680 LET Q(Q0)=1
01690 IF P9=20 GOTO 1730
01700 LET Q1=INT(60*(Z-Z0)/(Z1-Z0)+.5)+1
01710 IF Q1>61 GOTO 1730
01720 IF Q1>0 GOTO 1740
01730 LET Q1=0
01740 LET Q(Q1)=2+Q(Q1)
01750 LET Q2=Q1
01760 IF Q2>Q0 GOTO 1780
01770 LET Q2=Q0
01780 GOSUB 2040
01790 PRINT #3 TAB(S(1));
01800 FOR I=1 TO Q2
01810 LET Q=Q(I)
01820 IF Q=0 GOTO 1920
01830 IF Q=1 GOTO 1900
01840 IF P9=20 GOTO 1920
01850 IF Q=2 GOTO 1880
01860 PRINT#3 "O";
01870 GOTO 1930
01880 PRINT#3 "+";
01890 GOTO 1930
01900 PRINT#3 "*";
01910 GOTO 1930
01920 PRINT#3 " ";
01930 NEXT I
01940 PRINT#3
01950 LET Q(Q0)=0
01960 LET Q(Q1)=0
01970 GOTO 1620
01980 PRINT#3 TAB(S(1)) " I";
01990 FOR I=1 TO 6
02000  PRINT#3  ".........I";
02010 NEXT I
02020 PRINT#3
02030 RETURN
02040 IF INT(L/10)=L/10 GOTO 2100
02050 IF S(1)=0 GOTO 2070
02060 PRINT #3,F;
02070 PRINT #3,TAB(S(1))".";
02080 LET L=L+1
02090 RETURN
02100 IF S(1)=0 GOTO 2120
02110 PRINT #3,F;
02120 PRINT #3,TAB(S(1))"-";
02130 GOTO 2080
02140 LET Y0=1E35
02150 LET Z0=Y0
02160 LET Y1=-1E35
02170 LET Z1=Y1
02180 IF END #2,GOTO 1130
02190 INPUT #2,X,Y,Z
02200 IF Y>Y0 GOTO 2220
02210 LET Y0=Y
02220 IF Y<Y1 GOTO 2240
02230 LET Y1=Y
02240 IF Z>Z0 GOTO 2260
02250 LET Z0=Z
02260 IF Z<Z1 GOTO 2280
02270 LET Z1=Z
02280 GOTO 2180
02290 LET M2=Y0
02300 GOSUB 2420
02310 LET Y0=M2
02320 LET M2=Y1
02330 GOSUB 2420
02340 LET Y1=M2
02350 LET M2=Z0
02360 GOSUB 2420
02370 LET Z0=M2
02380 LET M2=Z1
02390 GOSUB 2420
02400 LET Z1=M2
02410 GOTO 1330
02420 IF M2=0 GOTO 2460
02430 LET M3=ABS(M2)
02440 LET M1=10^(INT(LOG(M3)/LOG(10)))
02450 LET M2=INT(100*M2/M1+.5)*M1/100
02460 RETURN
02470 GOSUB 1980
02480 PRINT #3<PA>
02490 GOTO 1040
02500 PRINT #3 TAB(S(1))"INITIAL VALUES:"
02510 PRINT #3
02520 PRINT #3 ,TAB(S(1)),"RESISTANCE","CAPACITANCE","INDUCTANCE"
02530 PRINT #3 TAB(S(1)) "SOURCE",X(0),X(1),X(2)
02540 PRINT #3 TAB(S(1))"LOAD",X(3),X(4),X(5)
02550 PRINT #3
02560 RETURN
02570 IF P9=4 GOTO 2680
02580 IF P9=2 GOTO 2720
02590 IF P9=0 GOTO 2740
02600 IF P9=6 GOTO 2780
02610 IF P9=8 GOTO 2900
02620 IF P9=18 GOTO 2860
02630 IF P9=20 GOTO 2800
02640 LET B$=""
02650 LET C$=""
02660 LET D$=""
02670 GOTO 880
02680 IF S(0)=0 GOTO 2980
02690 LET D$="LOGARITHMIC VOLTAGE GAIN"
02700 LET B$="MAGNITUDE (DB)"
02710 GOTO 3000
02720 LET D$="INPUT IMPEDANCE"
02730 GOTO 2990
02740 IF S(0)=0 GOTO 2960
02750 LET D$="LOGARITHMIC CURRENT GAIN"
02760 LET B$="MAGNIUTDE (DB)"
02770 GOTO 2990
02780 LET D$="OUTPUT IMPEDANCE"
02790 GOTO 2990
02800 LET D$="POWER GAIN"
02810 LET B$="G      (DB)    "
02820 LET C$=""
02830 IF S(0)<>0 GOTO 880
02840 LET B$="G              "
02850 GOTO 880
02860 LET D$="STABILITY FACTORS"
02870 LET B$="LINVILL  "
02880 LET C$="STERN    "
02890 GOTO 880
02900 IF S(0)<>0 GOTO 2930
02910 LET D$="VOLTAGE GAIN (SOURCE-LOAD)"
02920 GOTO 2990
02930 LET D$="LOGARITHMIC VOLTAGE GAIN (SOURCE-LOAD)"
02940 LET B$="MAGNITUDE (DB)"
02950 GOTO 3000
02960 LET D$="CURRENT GAIN"
02970 GOTO 2990
02980 LET D$="VOLTAGE GAIN"
02990 LET B$="MAGNITUDE"
03000 LET C$="PHASE    "
03010 GOTO 880
03020 IF P9=0 GOTO 3080
03030 IF P9=8 GOTO 3080
03040 IF P9=4 GOTO 3080
03050 IF P9=20 GOTO 3110
03060 PRINT #2,X(K0),G(P9),G(P9+1)
03070 RETURN
03080 IF S(0)=0 GOTO 3060
03090 PRINT #2,X(K0),20*CLOG(G(P9)),G(P9+1)
03100 RETURN
03110 IF S(0)=0 GOTO 3060
03120 PRINT #2,X(K0),10*CLOG(G(P9)),G(P9+1)
03130 RETURN
03140 INPUT  #1,X(0),X(1),X(2),X(3),X(4),X(5),F
03150 FOR I=0 TO 20
03160 INPUT #1,G(20)
03170 NEXT I
03180 INPUT #1,F
03190 IF F<0 GOTO 3210
03200 GOTO 3150
03210 INPUT #1,A0$
03220 IF END #1 GOTO 3270
03230 INPUT #1,G(0),G(1),G(2),G(3),G(4),G(5)
03240 FOR I=0 TO 5
03250 IF X(I)<>G(I) GOTO 3290
03260 NEXT I
03270 PRINT "THIS PROGRAM IS TO BE USED FOR VARIABLE TERMINATIONS ONLY."
03280 STOP
03290 LET K0=I
03300 RESTORE #1
03310 ON I+1 GOTO 3320,3340,3360,3380,3400,3420
03320 LET A0$="RS"
03330 GOTO 3430
03340 LET A0$="CS"
03350 GOTO 3430
03360 LET A0$="LS"
03370 GOTO 3430
03380 LET A0$="RL"
03390 GOTO 3430
03400 LET A0$="CL"
03410 GOTO 3430
03420 LET A0$="LL"
03430 GOTO 2500
03440 IF S(0)=0 GOTO 1240
03450 IF P9=0 GOTO 3500
03460 IF P9=4 GOTO 3500
03470 IF P9=8 GOTO 3500
03480 IF P9=20 GOTO 3500
03490 GOTO 1240
03500 LET Y1=(INT((Y1-.01)/5)+1)*5
03510 LET Y2=Y0
03520 LET Y0=Y1-15
03530 IF Y1-Y2<15.01 GOTO 3590
03540 IF Y1-Y2<30.01 GOTO 3580
03550 IF Y1-Y2<60.01 GOTO 3570
03560 LET Y0=Y0-60
03570 LET Y0=Y0-30
03580 LET Y0=Y0-15
03590 LET Z0=0
03600 LET Z1=360
03610 GOTO 1240
03620 END