Trailing-Edge
-
PDP-10 Archives
-
decuslib20-03
-
decus/20-0087/lan9.bas
There is 1 other file named lan9.bas in the archive. Click here to see a list.
00010 ' LAN9
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: GRAPH.LAN. SCALES ARE LINEAR, NOT LOG. SCALING
00050 ' IS AUTOMATIC.
00060 ' THIS GRAPH IS AN X-Y PLOT (POLAR)
00070 '
00080 '
00090'
00100 PRINT "OUTPUT FILE: XYPLOT.LAN"
00110 PRINT
00120 DIM X(5),G(21)
00130 FILES GAIN.LAN,LAN.BAK,XYPLOT.LAN
00140 MARGIN #3,110
00150 SCRATCH #2,#3
00160 PRINT
00170 PRINT "TYPE H FOR HELP"
00180 PRINT "*";
00190 INPUT A$
00200 IF A$="SYS" GOTO 2530
00210 IF A$="DIS" GOTO 350
00220 IF A$="H" GOTO 530
00230 IF A$="TABLE" GOTO 330
00240 IF A$="YPARAM" GOTO 340
00250 IF A$="AV" GOTO 380
00260 IF A$="ZIN" GOTO 410
00270 IF A$="AI" GOTO 440
00280 IF A$="ZOUT" GOTO 470
00290 IF A$="AVSL" GOTO 500
00300 IF A$="DETAIL" GOTO 360
00310 IF A$="EXIT" GOTO 2530
00320 GOTO 170
00330 CHAIN LAN6
00340 CHAIN LAN10
00350 CHAIN LAN,200
00360 LET P=1
00370 GOTO 180
00380 LET P9=4
00390 LET D$="VOLTAGE GAIN"
00400 GOTO 660
00410 LET P9=2
00420 LET D$="INPUT IMPEDANCE"
00430 GOTO 660
00440 LET P9=0
00450 LET D$="CURRENT GAIN"
00460 GOTO 660
00470 LET P9=6
00480 LET D$="OUTPUT IMPEDANCE"
00490 GOTO 660
00500 LET P9=8
00510 LET D$="VOLTAGE GAIN (SOURCE-LOAD)"
00520 GOTO 660
00530 PRINT
00540 PRINT "COMMAND","DESCRIPTION"
00550 PRINT "AV","VOLTAGE GAIN PLOT"
00560 PRINT "AI","CURRENT GAIN PLOT"
00570 PRINT "AVSL","VOLTAGE GAIN (TAKING INTO ACCOUNT SOURCE AND LOAD) PLOT"
00580 PRINT "ZIN","INPUT IMPEDANCE PLOT"
00590 PRINT "ZOUT","OUTPUT IMPEDANCE PLOT"
00600 PRINT "DETAIL","SELECT DETAILED AREAS FOR PLOT"
00610 PRINT "YPARAM","PLOT OF THE Y PARAMETERS OF THE NETWORK"
00620 PRINT "TABLE","OUTPUT DATA IN TABULAR FORM"
00630 PRINT "EXIT","EXIT BACK TO BASIC"
00640 PRINT "DIS","RETURN TO DISPATCHER"
00650 GOTO 180
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 780
00700 FOR I0=0 TO 17
00710 INPUT #1,G(I0)
00720 NEXT I0
00730 INPUT #1,G(20),G(18),G(19)
00740 LET G(21)=0
00750 LET B=3.141592654*G(P9+1)/180
00760 PRINT #2,G(P9)*COS(B),G(P9)*SIN(B)
00770 GOTO 680
00780 INPUT #1,A$
00790 RESTORE #2
00800 GOSUB 860
00810 SCRATCH #2
00820 GOTO 660
00830 RESTORE #1
00840 SCRATCH #2
00850 GOTO 180
00860 ' COMPUTE MIN AND MAX OF ABCISSA AND ORDINATE DATA
00870 LET I=K=1E36
00880 LET H=J=1E-36
00890 IF END#2 GOTO 2180
00900 INPUT #2,A,D
00910 IF A>=I GOTO 930
00920 LET I=A
00930 IF A<=H GOTO 950
00940 LET H=A
00950 IF D>=K GOTO 970
00960 LET K=D
00970 IF D<=J GOTO 990
00980 LET J=D
00990 GOTO 890
01000 RESTORE #2
01010 IF P=0 GOTO 1110
01020 PRINT "RE VALUES RANGE FROM ";I;"TO ";H,
01030 PRINT "IM VALUES RANGE FROM ";K;"TO ";J
01040 PRINT "DO YOU WANT TO KEEP THESE LIMITS";
01050 INPUT Z9$
01060 IF Z9$="N" GOTO 1090
01070 IF Z9$="NO" GOTO 1090
01080 IF Z9$<>"0" GOTO 1110
01090 PRINT "ENTER VALUES OF X(MIN),X(MAX),JY(MIN),JY(MAX)";
01100 INPUT I,H,K,J
01110 IF H<>I GOTO 1130
01120 LET H=0
01130 IF H>I GOTO 1170
01140 LET Z9=H
01150 LET H=I
01160 LET I=Z9
01170 IF J<>K GOTO 1190
01180 LET J=0
01190 IF J>K GOTO 1230
01200 LET Z9=J
01210 LET J=K
01220 LET K=Z9
01230 ' COMPUTE ORDINATE CURSOR
01240 LET Z1=INT(40*I/(I-H)+.5)
01250 ' COMPUTE ABSCISSA CURSOR
01260 LET Z2=INT(24*K/(K-J)+.5)
01270 DIM B(25,41)
01280 FOR I0=0 TO 25
01290 LET B(I0,0)=0
01300 LET B(0,I0)=0
01310 NEXT I0
01320 FOR I0=26 TO 41
01330 LET B(0,I0)=0
01340 NEXT I0
01350 MAT B=ZER
01360 ' ENTER ZERO-ONE DATA IN MATRIX B
01370 IF END #2 GOTO 1470
01380 INPUT #2,A,D
01390 LET N=INT(40*(A-I)/(H-I)+.5)
01400 LET M=24-INT(24*(D-K)/(J-K)+.5)
01410 IF M>25 GOTO 1460
01420 IF M<0 GOTO 1460
01430 IF N>41 GOTO 1460
01440 IF N<0 GOTO 1460
01450 LET B(M,N)=1
01460 GOTO 1370
01470 RESTORE #2
01480 PRINT#3,<PA>
01490 PRINT#3 TAB(27) "***"D$"***"
01500 PRINT#3,
01510 ' COMPUTE ABSCISSA SCALE FACTOR
01520 IF(H-I)/40<.001 THEN 1560
01530 LET F=(H-I)/40
01540 LET W=1
01550 GOTO 1600
01560 LET F=25*(H-I)
01570 LET W=1E3
01580 PRINT#3, TAB(29);"SCALE FACTOR X1000"
01590 PRINT#3,
01600 PRINT#3, " ",
01610 FOR Z=0 TO 40 STEP 10
01620 PRINT#3, TAB(13+Z);.001*INT(1E3*(I*W+F*Z)+.5);
01630 NEXT Z
01640 PRINT#3, " "
01650 PRINT#3, " IM",
01660 GOSUB 2050
01670 PRINT#3, "I ";
01680 PRINT#3, "RE"
01690 ' PRINT COMPOSITE DATA
01700 FOR M=0 TO 24
01710 IF M=24-Z2 THEN 1780
01720 LET F=(J-K)/24
01730 IF F<.001 THEN 1760
01740 PRINT#3, .001*INT(1E3*(J-M*F)+.5),
01750 GOTO 1790
01760 PRINT#3, J-M*F,
01770 GOTO 1790
01780 PRINT #3,0,
01790 FOR N=0 TO 40
01800 IF B(M,N)=1 THEN 1850
01810 IF M=24-Z2 THEN 1870
01820 IF N=Z1 THEN 1890
01830 PRINT#3, " ";
01840 GOTO 1900
01850 PRINT#3, "*";
01860 GOTO 1900
01870 PRINT#3, "-";
01880 GOTO 1900
01890 PRINT #3, ":";
01900 NEXT N
01910 PRINT#3, " "
01920 NEXT M
01930 PRINT #3 TAB(14);
01940 GOSUB 2050
01950 PRINT #3,"I"
01960 PRINT #3
01970 PRINT #3
01980 PRINT #3 ,,"RESISTANCE","CAPACITANCE","INDUCTANCE"
01990 PRINT #3 ,"SOURCE",X(0),X(1),X(2)
02000 PRINT #3 ,"LOAD",X(3),X(4),X(5)
02010 RETURN
02020 IF P=0 GOTO 2040
02030 GOTO 2120
02040 LET P=0
02050 FOR Z=0 TO 35 STEP 5
02060 PRINT#3, "I";
02070 FOR E=0 TO 3
02080 PRINT#3, ".";
02090 NEXT E
02100 NEXT Z
02110 RETURN
02120 PRINT "ANY MORE SCALE CHANGES";
02130 INPUT Z9$
02140 IF Z9$="0" GOTO 2040
02150 IF Z9$="NO" GOTO 2040
02160 IF Z9$="N" GOTO 2040
02170 GOTO 1090
02180 ' THIS SECTION ELIMINATES PROBLEMS CAUSED BY A CONSTANT
02190 ' AND ALSO ROUNDS TO 3 SIGNIFICANT DIGITS
02200 IF I<>H GOTO 2280
02210 IF I=0 GOTO 2250
02220 IF I>0 GOTO 2270
02230 LET H=0
02240 GOTO 2280
02250 LET H=1
02260 GOTO 2280
02270 LET I=0
02280 IF K<>J GOTO 2360
02290 IF K=0 GOTO 2330
02300 IF K>0 GOTO 2350
02310 LET J=0
02320 GOTO 2360
02330 LET J=1
02340 GOTO 2360
02350 LET K=0
02360 IF H=0 GOTO 2400
02370 LET M3=ABS(H)
02380 LET M1=10^(INT(LOG(M3)/LOG(10)))
02390 LET H=INT(100*H/M1+.5)*M1/100
02400 IF I=0 GOTO 2440
02410 LET M3=ABS(I)
02420 LET M1=10^(INT(LOG(M3)/LOG(10)))
02430 LET I=INT(100*I/M1+.5)*M1/100
02440 IF J=0 GOTO 2480
02450 LET M3=ABS(J)
02460 LET M1=10^(INT(LOG(M3)/LOG(10)))
02470 LET J=INT(100*J/M1+.5)*M1/100
02480 IF K=0 GOTO 2520
02490 LET M3=ABS(K)
02500 LET M1=10^(INT(LOG(M3)/LOG(10)))
02510 LET K=INT(100*K/M1+.5)*M1/100
02520 GOTO 1000
02530 END