Google
 

Trailing-Edge - PDP-10 Archives - decuslib20-03 - decus/20-0087/lan18.bas
There is 1 other file named lan18.bas in the archive. Click here to see a list.
00010 '  LAN18
00020 '  DUANE MOORE    D I G I T A L
00030 '  READS THE FILE GAIN.LAN AND SELECTED FUNCTIONS ARE PLOTTED
00040 '  ON THE TELETYPE.  SCALES ARE LINEAR, NOT LOG.  SCALING
00050 '  IS AUTOMATIC. 
00060 ' THIS GRAPH IS AN X-Y PLOT (POLAR)
00070 '
00080 '
00090'
00100 PRINT
00110 DIM X(5),G(21)
00120 FILES GAIN.LAN,LAN.BAK
00130 SCRATCH #2
00140 PRINT
00150 PRINT "TYPE H FOR HELP"
00160 PRINT "*";
00170 INPUT A$
00180 IF A$="SYS" GOTO 2560
00190 IF A$="DIS" GOTO 330
00200 IF A$="H" GOTO 510
00210 IF A$="TABLE" GOTO 310
00220 IF A$="YPARAM" GOTO 320
00230 IF A$="AV" GOTO 360
00240 IF A$="ZIN" GOTO 390
00250 IF A$="AI" GOTO 420
00260 IF A$="ZOUT" GOTO 450
00270 IF A$="AVSL" GOTO 480
00280 IF A$="DETAIL" GOTO 340
00290 IF A$="EXIT" GOTO 2560
00300 GOTO 150
00310 CHAIN LAN4
00320 CHAIN LAN16
00330 CHAIN LAN,200
00340 LET P=1
00350 GOTO 160
00360 LET P9=4
00370 LET D$="VOLTAGE GAIN"
00380 GOTO 640
00390 LET P9=2
00400 LET D$="INPUT IMPEDANCE"
00410 GOTO 640
00420 LET P9=0
00430 LET D$="CURRENT GAIN"
00440 GOTO 640
00450 LET P9=6
00460 LET D$="OUTPUT IMPEDANCE"
00470 GOTO 640
00480 LET P9=8
00490 LET D$="VOLTAGE GAIN (SOURCE-LOAD)"
00500 GOTO 640
00510 PRINT
00520 PRINT "COMMAND","DESCRIPTION"
00530 PRINT "AV","VOLTAGE GAIN PLOT"
00540 PRINT "AI","CURRENT GAIN PLOT"
00550 PRINT "AVSL","VOLTAGE GAIN (TAKING INTO ACCOUNT SOURCE AND LOAD) PLOT"
00560 PRINT "ZIN","INPUT IMPEDANCE PLOT"
00570 PRINT "ZOUT","OUTPUT IMPEDANCE PLOT"
00580 PRINT "DETAIL","SELECT DETAILED AREAS FOR PLOT"
00590 PRINT "YPARAM","PLOT OF THE Y PARAMETERS OF THE NETWORK"
00600 PRINT "TABLE","OUTPUT DATA IN TABULAR FORM"
00610 PRINT "EXIT","EXIT BACK TO BASIC"
00620 PRINT "DIS","RETURN TO DISPATCHER"
00630 GOTO 160
00640 IF END #1, GOTO 810
00650 INPUT #1,X(0),X(1),X(2),X(3),X(4),X(5)
00660 INPUT #1,F
00670 IF F<0 GOTO 760
00680 FOR I0=0 TO 17
00690 INPUT #1,G(I0)
00700 NEXT I0
00710 INPUT #1,G(20),G(18),G(19)
00720 LET G(21)=0
00730 LET B=3.141592654*G(P9+1)/180
00740 PRINT #2,G(P9)*COS(B),G(P9)*SIN(B)
00750 GOTO 660
00760 INPUT #1,A$
00770 RESTORE #2
00780 GOSUB 850
00790 SCRATCH #2
00800 GOTO 640
00810 RESTORE #1
00820 SCRATCH #2
00830 GOSUB 2170
00840 GOTO 160
00850 ' COMPUTE MIN AND MAX OF ABCISSA AND ORDINATE DATA
00860 LET I=K=1E36
00870 LET H=J=1E-36
00880 IF END#2 GOTO 2210
00890 INPUT #2,A,D
00900 IF A>=I GOTO 920
00910 LET I=A
00920 IF A<=H GOTO 940
00930 LET H=A
00940 IF D>=K GOTO 960
00950 LET K=D
00960 IF D<=J GOTO 980
00970 LET J=D
00980 GOTO 880
00990 RESTORE #2
01000 IF P=0 GOTO 1100
01010 PRINT "RE VALUES RANGE FROM ";I;"TO ";H,
01020 PRINT "IM VALUES RANGE FROM ";K;"TO ";J
01030 PRINT "DO YOU WANT TO KEEP THESE LIMITS";
01040 INPUT Z9$
01050 IF Z9$="N" GOTO 1080
01060 IF Z9$="NO" GOTO 1080
01070 IF Z9$<>"0" GOTO 1100
01080 PRINT "ENTER VALUES OF X(MIN),X(MAX),JY(MIN),JY(MAX)";
01090 INPUT I,H,K,J
01100 IF H<>I GOTO 1120
01110 LET H=0
01120 IF H>I GOTO 1160
01130 LET Z9=H
01140 LET H=I
01150 LET I=Z9
01160 IF J<>K GOTO 1180
01170 LET J=0
01180 IF J>K GOTO 1220
01190 LET Z9=J
01200 LET J=K
01210 LET K=Z9
01220 ' COMPUTE ORDINATE CURSOR
01230 LET Z1=INT(40*I/(I-H)+.5)
01240 ' COMPUTE ABSCISSA CURSOR
01250 LET Z2=INT(24*K/(K-J)+.5)
01260 DIM B(25,41)
01270 FOR I0=0 TO 25
01280 LET B(I0,0)=0
01290 LET B(0,I0)=0
01300 NEXT I0
01310 FOR I0=26 TO 41
01320 LET B(0,I0)=0
01330 NEXT I0
01340 MAT B=ZER
01350 ' ENTER ZERO-ONE DATA IN MATRIX B
01360 IF END #2 GOTO 1460
01370 INPUT #2,A,D
01380 LET N=INT(40*(A-I)/(H-I)+.5)
01390 LET M=24-INT(24*(D-K)/(J-K)+.5)
01400 IF M>25 GOTO 1450
01410 IF M<0 GOTO 1450
01420 IF N>41 GOTO 1450
01430 IF N<0 GOTO 1450
01440 LET B(M,N)=1
01450 GOTO 1360
01460 RESTORE #2
01470 GOSUB 2170
01480 PRINT,,,"***"D$"***"
01490 PRINT
01500 ' COMPUTE ABSCISSA SCALE FACTOR
01510 IF(H-I)/40<.001 THEN 1550
01520 LET F=(H-I)/40
01530 LET W=1
01540 GOTO 1590
01550 LET F=25*(H-I)
01560 LET W=1E3
01570 PRINT TAB(29);"SCALE FACTOR X1000"
01580 PRINT
01590 PRINT " ",
01600 FOR Z=0 TO 40 STEP 10
01610 PRINT TAB(13+Z);.001*INT(1E3*(I*W+F*Z)+.5);
01620 NEXT Z
01630 PRINT " "
01640 PRINT " IM",
01650 GOSUB 2040
01660 PRINT "I ";
01670 PRINT "RE"
01680 ' PRINT COMPOSITE DATA
01690 FOR M=0 TO 24
01700 IF M=24-Z2 THEN 1770
01710 LET F=(J-K)/24
01720 IF F<.001 THEN 1750
01730 PRINT .001*INT(1E3*(J-M*F)+.5),
01740 GOTO 1780
01750 PRINT J-M*F,
01760 GOTO 1780
01770 PRINT 0,
01780 FOR N=0 TO 40
01790 IF B(M,N)=1 THEN 1840
01800 IF M=24-Z2 THEN 1860
01810 IF N=Z1  THEN 1880
01820 PRINT " ";
01830 GOTO 1890
01840 PRINT "*";
01850 GOTO 1890
01860 PRINT "-";
01870 GOTO 1890
01880 PRINT  ":";
01890 NEXT N
01900 PRINT " "
01910 NEXT M
01920  PRINT TAB(14);
01930 GOSUB 2040
01940 PRINT "I"
01950 PRINT 
01960 PRINT
01970 PRINT ,,"RESISTANCE","CAPACITANCE","INDUCTANCE"
01980 PRINT ,"SOURCE",X(0),X(1),X(2)
01990 PRINT ,"LOAD",X(3),X(4),X(5)
02000 RETURN
02010 IF P=0 GOTO 2030
02020 GOTO 2110
02030 LET P=0
02040 FOR Z=0 TO 35 STEP 5
02050 PRINT "I";
02060 FOR E=0 TO 3
02070 PRINT ".";
02080 NEXT E
02090 NEXT Z
02100 RETURN
02110 PRINT "ANY MORE SCALE CHANGES";
02120 INPUT Z9$
02130 IF Z9$="0" GOTO 2030
02140 IF Z9$="NO" GOTO 2030
02150 IF Z9$="N" GOTO 2030
02160 GOTO 1080
02170 PRINT
02180 PRINT
02190 PRINT
02200 RETURN
02210 ' THIS SECTION ELIMINATES PROBLEMS CAUSED BY A CONSTANT
02220 ' AND ALSO ROUNDS TO 3 SIGNIFICANT DIGITS
02230 IF I<>H GOTO 2310
02240 IF I=0 GOTO 2280
02250 IF I>0 GOTO 2300
02260 LET H=0
02270 GOTO 2310
02280 LET H=1
02290 GOTO 2310
02300 LET I=0
02310 IF K<>J GOTO 2390
02320 IF K=0 GOTO 2360
02330 IF K>0 GOTO 2380
02340 LET J=0
02350 GOTO 2390
02360 LET J=1
02370 GOTO 2390
02380 LET K=0
02390 IF H=0 GOTO 2430
02400 LET M3=ABS(H)
02410 LET M1=10^(INT(LOG(M3)/LOG(10)))
02420 LET H=INT(100*H/M1+.5)*M1/100
02430 IF I=0 GOTO 2470
02440 LET M3=ABS(I)
02450 LET M1=10^(INT(LOG(M3)/LOG(10)))
02460 LET I=INT(100*I/M1+.5)*M1/100
02470 IF J=0 GOTO 2510
02480 LET M3=ABS(J)
02490 LET M1=10^(INT(LOG(M3)/LOG(10)))
02500 LET J=INT(100*J/M1+.5)*M1/100
02510 IF K=0 GOTO 2550
02520 LET M3=ABS(K)
02530 LET M1=10^(INT(LOG(M3)/LOG(10)))
02540 LET K=INT(100*K/M1+.5)*M1/100
02550 GOTO 990
02560 END