Google
 

Trailing-Edge - PDP-10 Archives - decuslib10-04 - 43,50353/lan8.bas
There is 1 other file named lan8.bas in the archive. Click here to see a list.
00010 '  LAN8
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(4)
00120 GOSUB 3150
00130 PRINT
00140 PRINT "TYPE H FOR HELP"
00150 PRINT "*";
00160 INPUT A$
00170 IF A$="SYS" GOTO 3630
00180 IF A$="H" GOTO 610
00190 IF A$="TABLE" GOTO 350
00200 IF A$="DIS" GOTO 360
00210 IF A$="G" GOTO 470
00220 IF A$="AV" GOTO 490
00230 IF A$="ZIN" GOTO 510
00240 IF A$="AI" GOTO 530
00250 IF A$="ZOUT" GOTO 550
00260 IF A$="AVSL" GOTO 570
00270 IF A$="STA" GOTO 590
00280 IF A$="EXIT" GOTO 3630
00290 IF A$="DB" GOTO 410
00300 IF A$="LABEL" GOTO 430
00310 IF A$="LIN" GOTO 450
00320 IF A$="AUTO" GOTO 370
00330 IF A$="SEL" GOTO 390
00340 GOTO 140
00350 CHAIN LAN11
00360 CHAIN LAN,200
00370 LET S(2)=0
00380 GOTO 150
00390 LET S(2)=1
00400 GOTO 150
00410 LET S(0)=1
00420 GOTO 150
00430 LET S(1)=10
00440 GOTO 150
00450 LET S(0)=0
00460 GOTO 150
00470 LET P9=20
00480 GOTO 820
00490 LET P9=4
00500 GOTO 820
00510 LET P9=2
00520 GOTO 820
00530 LET P9=0
00540 GOTO 820
00550 LET P9=6
00560 GOTO 820
00570 LET P9=8
00580 GOTO 820
00590 LET P9=18
00600 GOTO 820
00610 PRINT
00620 PRINT "COMMAND","DESCRIPTION"
00630 PRINT "AV","VOLTAGE GAIN PLOT"
00640 PRINT "AI","CURRENT GAIN PLOT"
00650 PRINT "AVSL","VOLTAGE GAIN (TAKING INTO ACCOUNT SOURCE AND LOAD) PLOT"
00660 PRINT "G","POWER GAIN"
00670 PRINT "ZIN","INPUT IMPEDANCE PLOT"
00680 PRINT "ZOUT","OUTPUT IMPEDANCE PLOT"
00690 PRINT "STA","PLOT OF LINVILL AND STERN STABILITY FACTORS"
00700 PRINT "LIN","ORDINATE IS LINEAR*"
00710 PRINT "DB","ORDINATE IS IN DB"
00720 PRINT "LABEL","LABEL INCREMENTING PART'S VALUE"
00730 PRINT "AUTO","AUTOMATIC ORDINATE SCALING*"
00740 PRINT "SEL","SELECT ORDINATE SCALE FACTORS"
00750 PRINT "TABLE","OUTPUT DATA IN TABULAR FORM"
00760 PRINT "EXIT","EXIT BACK TO BASIC"
00770 PRINT "DIS","RETURN TO DISPATCHER"
00780 PRINT
00790 PRINT ,"*  INITIAL CONDITION."
00800 PRINT
00810 GOTO 150
00820 LET G(21)=0
00830 LET S(4)=0
00840 GOSUB 2540
00850 GOTO 2580
00860 IF END#1 GOTO 1090
00870 INPUT #1,X(0),X(1),X(2),X(3),X(4),X(5)
00880 INPUT #1,F
00890 IF F<0 GOTO 990
00900 FOR I=0 TO 17
00910 INPUT #1,G(I)
00920 NEXT I
00930 INPUT #1,G(20),G(18),G(19)
00940 LET G(21)=0
00950 IF S(4)=1 GOTO 880
00960 GOSUB 3030
00970 LET S(4)=1
00980 GOTO 880
00990 INPUT #1,A1$
01000 LET S(4)=0
01010 GOTO 860
01020 RESTORE #1
01030 RESTORE #2
01040 SCRATCH #2
01050 LET S(3)=0
01060 LET S(4)=0
01070 GOSUB 2540
01080 GOTO 150
01090 MAT Q=ZER(61)
01100 RESTORE #2
01110 GOTO 2130
01120 RESTORE #2
01130 IF S(2)=0 GOTO 3450
01140 PRINT "'*' RANGES FROM "Y0"TO "Y1
01150 PRINT "'+' RANGES FROM "Z0"TO "Z1
01160 PRINT "OK";
01170 INPUT Z9$
01180 IF Z9$="Y" GOTO 1230
01190 IF Z9$="YES" GOTO 1230
01200 IF Z9$="1" GOTO 1230
01210 PRINT "ENTER VALUES OF *(MIN),*(MAX),+(MIN),+(MAX)";
01220 INPUT Y0,Y1,Z0,Z1
01230 IF Y0<>Y1 GOTO 1310
01240 IF Y0=0 GOTO 1280
01250 IF Y0>0 GOTO 1300
01260 LET Y1=0
01270 GOTO 1310
01280 LET Y1=1
01290 GOTO 1310
01300 LET Y0=0
01310 IF Z0<>Z1 GOTO 1400
01320 IF Z0=0 GOTO 1360
01330 IF Z0>0 GOTO 1380
01340 LET Z1=0
01350 GOTO 1400
01360 LET Z1=1
01370 GOTO 1400
01380 LET Z0=0
01390 IF S(3)=1 GOTO 1610
01400 PRINT  TAB(22+S(1))"***"D$"***"
01410 PRINT 
01420 LET M2=Y0
01430 GOSUB 2410
01440 PRINT TAB(S(1)) M2 TAB(20+S(1));
01450 LET M2=Y1
01460 GOSUB 2410
01470 PRINT B$,"'*'"TAB(57+S(1))M2
01480 PRINT
01490 IF P9=20 GOTO 1560
01500 LET M2=Z0
01510 GOSUB 2410
01520 PRINT TAB(S(1))  M2 TAB(20+S(1));
01530 LET M2=Z1
01540 GOSUB 2410
01550 PRINT C$,"'+'"TAB(57+S(1))M2
01560 IF S(1)=0 GOTO 1580
01570 PRINT "  " A0$;
01580 GOSUB 1970
01590 LET L=0
01600 LET S(3)=1
01610 IF END #2,GOTO 2460
01620 INPUT #2,F,Y,Z
01630 LET Q0=INT(60*(Y-Y0)/(Y1-Y0)+.5)+1
01640 IF Q0>61 GOTO 1660
01650 IF Q0>0 GOTO 1670
01660 LET Q0=0
01670 LET Q(Q0)=1
01680 IF P9=20 GOTO 1720
01690 LET Q1=INT(60*(Z-Z0)/(Z1-Z0)+.5)+1
01700 IF Q1>61 GOTO 1720
01710 IF Q1>0 GOTO 1730
01720 LET Q1=0
01730 LET Q(Q1)=2+Q(Q1)
01740 LET Q2=Q1
01750 IF Q2>Q0 GOTO 1770
01760 LET Q2=Q0
01770 GOSUB 2030
01780 PRINT TAB(S(1));
01790 FOR I=1 TO Q2
01800 LET Q=Q(I)
01810 IF Q=0 GOTO 1910
01820 IF Q=1 GOTO 1890
01830 IF P9=20 GOTO 1910
01840 IF Q=2 GOTO 1870
01850 PRINT "O";
01860 GOTO 1920
01870 PRINT "+";
01880 GOTO 1920
01890 PRINT "*";
01900 GOTO 1920
01910 PRINT " ";
01920 NEXT I
01930 PRINT
01940 LET Q(Q0)=0
01950 LET Q(Q1)=0
01960 GOTO 1610
01970 PRINT TAB(S(1)) " I";
01980 FOR I=1 TO 6
01990  PRINT  ".........I";
02000 NEXT I
02010 PRINT
02020 RETURN
02030 IF INT(L/10)=L/10 GOTO 2090
02040 IF S(1)=0 GOTO 2060
02050 PRINT F;
02060 PRINT TAB(S(1))".";
02070 LET L=L+1
02080 RETURN
02090 IF S(1)=0 GOTO 2110
02100 PRINT F;
02110 PRINT TAB(S(1))"-";
02120 GOTO 2070
02130 LET Y0=1E35
02140 LET Z0=Y0
02150 LET Y1=-1E35
02160 LET Z1=Y1
02170 IF END #2,GOTO 1120
02180 INPUT #2,X,Y,Z
02190 IF Y>Y0 GOTO 2210
02200 LET Y0=Y
02210 IF Y<Y1 GOTO 2230
02220 LET Y1=Y
02230 IF Z>Z0 GOTO 2250
02240 LET Z0=Z
02250 IF Z<Z1 GOTO 2270
02260 LET Z1=Z
02270 GOTO 2170
02280 LET M2=Y0
02290 GOSUB 2410
02300 LET Y0=M2
02310 LET M2=Y1
02320 GOSUB 2410
02330 LET Y1=M2
02340 LET M2=Z0
02350 GOSUB 2410
02360 LET Z0=M2
02370 LET M2=Z1
02380 GOSUB 2410
02390 LET Z1=M2
02400 GOTO 1320
02410 IF M2=0 GOTO 2450
02420 LET M3=ABS(M2)
02430 LET M1=10^(INT(LOG(M3)/LOG(10)))
02440 LET M2=INT(100*M2/M1+.5)*M1/100
02450 RETURN
02460 GOSUB 1970
02470 PRINT 
02480 GOTO 1020
02490 PRINT TAB(S(1))"INITIAL VALUES:"
02500 PRINT
02510 PRINT TAB(S(1)),"RESISTANCE","CAPACITANCE","INDUCTANCE"
02520 PRINT TAB(S(1)) "SOURCE",X(0),X(1),X(2)
02530 PRINT TAB(S(1))"LOAD",X(3),X(4),X(5)
02540 PRINT
02550 PRINT
02560 PRINT
02570 RETURN
02580 IF P9=4 GOTO 2690
02590 IF P9=2 GOTO 2730
02600 IF P9=0 GOTO 2750
02610 IF P9=6 GOTO 2790
02620 IF P9=8 GOTO 2910
02630 IF P9=18 GOTO 2870
02640 IF P9=20 GOTO 2810
02650 LET B$=""
02660 LET C$=""
02670 LET D$=""
02680 GOTO 860
02690 IF S(0)=0 GOTO 2990
02700 LET D$="LOGARITHMIC VOLTAGE GAIN"
02710 LET B$="MAGNITUDE (DB)"
02720 GOTO 3010
02730 LET D$="INPUT IMPEDANCE"
02740 GOTO 3000
02750 IF S(0)=0 GOTO 2970
02760 LET D$="LOGARITHMIC CURRENT GAIN"
02770 LET B$="MAGNIUTDE (DB)"
02780 GOTO 3000
02790 LET D$="OUTPUT IMPEDANCE"
02800 GOTO 3000
02810 LET D$="POWER GAIN"
02820 LET B$="G      (DB)    "
02830 LET C$=""
02840 IF S(0)<>0 GOTO 860
02850 LET B$="G              "
02860 GOTO 860
02870 LET D$="STABILITY FACTORS"
02880 LET B$="LINVILL  "
02890 LET C$="STERN    "
02900 GOTO 860
02910 IF S(0)<>0 GOTO 2940
02920 LET D$="VOLTAGE GAIN (SOURCE-LOAD)"
02930 GOTO 3000
02940 LET D$="LOGARITHMIC VOLTAGE GAIN (SOURCE-LOAD)"
02950 LET B$="MAGNITUDE (DB)"
02960 GOTO 3010
02970 LET D$="CURRENT GAIN"
02980 GOTO 3000
02990 LET D$="VOLTAGE GAIN"
03000 LET B$="MAGNITUDE"
03010 LET C$="PHASE    "
03020 GOTO 860
03030 IF P9=0 GOTO 3090
03040 IF P9=8 GOTO 3090
03050 IF P9=4 GOTO 3090
03060 IF P9=20 GOTO 3120
03070 PRINT #2,X(K0),G(P9),G(P9+1)
03080 RETURN
03090 IF S(0)=0 GOTO 3070
03100 PRINT #2,X(K0),20*CLOG(G(P9)),G(P9+1)
03110 RETURN
03120 IF S(0)=0 GOTO 3070
03130 PRINT #2,X(K0),10*CLOG(G(P9)),G(P9+1)
03140 RETURN
03150 INPUT  #1,X(0),X(1),X(2),X(3),X(4),X(5),F
03160 FOR I=0 TO 20
03170 INPUT #1,G(20)
03180 NEXT I
03190 INPUT #1,F
03200 IF F<0 GOTO 3220
03210 GOTO 3160
03220 INPUT #1,A0$
03230 IF END #1 GOTO 3280
03240 INPUT #1,G(0),G(1),G(2),G(3),G(4),G(5)
03250 FOR I=0 TO 5
03260 IF X(I)<>G(I) GOTO 3300
03270 NEXT I
03280 PRINT "THIS PROGRAM IS TO BE USED FOR VARIABLE TERMINATIONS ONLY."
03290 STOP
03300 LET K0=I
03310 RESTORE #1
03320 ON I+1 GOTO 3330,3350,3370,3390,3410,3430
03330 LET A0$="RS"
03340 GOTO 3440
03350 LET A0$="CS"
03360 GOTO 3440
03370 LET A0$="LS"
03380 GOTO 3440
03390 LET A0$="RL"
03400 GOTO 3440
03410 LET A0$="CL"
03420 GOTO 3440
03430 LET A0$="LL"
03440 GOTO 2490
03450 IF S(0)=0 GOTO 1230
03460 IF P9=0 GOTO 3510
03470 IF P9=4 GOTO 3510
03480 IF P9=8 GOTO 3510
03490 IF P9=20 GOTO 3510
03500 GOTO 1230
03510 LET Y1=(INT((Y1-.01)/5)+1)*5
03520 LET Y2=Y0
03530 LET Y0=Y1-15
03540 IF Y1-Y2<15.01 GOTO 3600
03550 IF Y1-Y2<30.01 GOTO 3590
03560 IF Y1-Y2<60.01 GOTO 3580
03570 LET Y0=Y0-60
03580 LET Y0=Y0-30
03590 LET Y0=Y0-15
03600 LET Z0=0
03610 LET Z1=360
03620 GOTO 1230
03630 END