Google
 

Trailing-Edge - PDP-10 Archives - decuslib10-04 - 43,50353/term2.bas
There is 1 other file named term2.bas in the archive. Click here to see a list.
00010  '     TERM2.BAS        DUANE MOORE        D I G I T A L
00020  '     CREATES A FILE OF TERMINATION DATA FOR *LAN* PROGRAMS.
00030 FILES TERM.LAN
00040 SCRATCH #1
00050 PRINT "ENTER INITIAL VALUES OF SOURCE AND LOAD TERMINATIONS"
00060 PRINT "(SERIES CONNECTED ELEMENTS)."
00070 PRINT
00080 LET V4=0
00090 PRINT "SOURCE";
00100 LET I=1
00110 GOSUB 160
00120 PRINT "LOAD";
00130 LET I=2
00140 GOSUB 160
00150 GOTO 290
00160 PRINT " TERMINATION:"
00170 PRINT
00180 PRINT "R (KILOHMS)";
00190 INPUT T(I,1)
00200 LET T(I,1)=T(I,1)*1E3
00210 PRINT "C (MFD.)";
00220 INPUT T(I,2)
00230 LET T(I,2)=T(I,2)*1E-6
00240 PRINT "L (MILLIHENRY)";
00250 INPUT T(I,3)
00260 LET T(I,3)=T(I,3)*1E-3
00270 PRINT
00280 RETURN
00290 PRINT "IDENTIFICATION CODE:"
00300 PRINT
00310 PRINT ,"RESISTANCE","CAPACITANCE","INDUCTANCE"
00320 PRINT "SOURCE","    RS","    CS","    LS"
00330 PRINT "LOAD","    RL","    CL","    LL"
00340 PRINT
00350 PRINT "WHICH PARAMETER WILL BE 'SWEEPED'";
00360 INPUT A$
00370 LET K=1
00380 IF A$="RS" GOTO 470
00390 IF A$="CS" GOTO 490
00400 IF A$="LS" GOTO 510
00410 LET K=2
00420 IF A$="RL" GOTO 470
00430 IF A$="CL" GOTO 490
00440 IF A$="LL" GOTO 510
00450 PRINT "WHAT?"
00460 GOTO 350
00470 LET L=1
00480 GOTO 530
00490 LET L=2
00500 GOTO 530
00510 LET L=3
00520 GOTO 530
00530 LET V0=T(K,L)
00540 PRINT
00550 PRINT "OPTION","DESCRIPTION"
00560 PRINT "LIN","LINEAR SWEEP"
00570 PRINT "LOG","LOGARITHMIC"
00580 PRINT "MOD","MODIFIED LOG"
00590 PRINT "DBL","DOUBLE"
00600 PRINT
00610 PRINT "OPTION";
00620 INPUT A$
00630 IF A$="LIN" GOTO 680
00640 IF V0=0 GOTO 350
00650 IF V0>0 GOTO 680
00660 PRINT "ILLEGAL INITIAL VALUE FOR THIS OPTION."
00670 GOTO 350
00680 IF V0<0 GOTO 660
00690 PRINT "HIGHEST VALUE:"
00700 GOSUB 1110
00710 LET V1=V5
00720 IF V1>V0 GOTO 750
00730 PRINT "WHAT?"
00740 GOTO 690
00750 IF A$="DBL" GOTO 920
00760 IF A$="MOD" GOTO 890
00770 IF A$="LOG" GOTO 840
00780 PRINT "INCREMENT:"
00790 GOSUB 1110
00800 LET V2=V5
00810 IF V2>0 GOTO 920
00820 PRINT "WHAT?"
00830 GOTO 780
00840 PRINT "NUMBER OF STEPS PER 'DECADE'";
00850 INPUT V2
00860 IF V2>0 GOTO 920
00870 PRINT "WHAT?"
00880 GOTO 840
00890 LET V0=10^(INT(LOG(V0)/LOG(10)))
00900 LET V2=V0
00910 LET V4=1
00920 PRINT #1,T(1,1),T(1,2),T(1,3)
00930 PRINT #1,T(2,1),T(2,2),T(2,3)
00940 IF A$="LOG" GOTO 990
00950 IF A$="LIN" GOTO 1020
00960 IF A$="MOD" GOTO 1040
00970 LET T(K,L)=T(K,L)*2
00980 GOTO 1090
00990 LET V4=V4+1/V2
01000 LET T(K,L)=V0*10^V4
01010 GOTO 1090
01020 LET T(K,L)=T(K,L)+V2
01030 GOTO 1090
01040 LET V4=V4+1
01050 IF V4<10 GOTO 1080
01060 LET V4=1
01070 LET V2=10*V2
01080 LET T(K,L)=V2*V4
01090 IF T(K,L)<=V1 GOTO 920
01100 CHAIN LAN,200
01110 IF L=3 GOTO 1210
01120 IF L=2 GOTO 1170
01130 PRINT "R (KILOHMS)";
01140 INPUT V5
01150 LET V5=V5*1E3
01160 GOTO 1240
01170 PRINT "C (MFD.)";
01180 INPUT V5
01190 LET V5=V5*1E-6
01200 GOTO 1240
01210 PRINT "L (MILLIHENRY)";
01220 INPUT V5
01230 LET V5=V5*1E-3
01240 RETURN
01250 END