00010 PRINT "THIS PROGRAM WILL COMPUTE MISCELLANEOUS ";
00020 PRINT "ELECTRONIC FORMULAS":PRINT 
00030 PRINT "IF NOT SPECIFIED, ALL ENTRIES ARE IN UNITS":PRINT 
00040 REM PROGRAM BY PAUL CRABTREE
00050 PRINT TAB(21)"ENTER NUMBER OF ITEM":PRINT 
00060 CLEAR 
00070 PRINT 
00080 DIM R1(20),C1(20),L1(20)
00090 FOR X=1TO 12:READ B$:IF B$="777"GOTO 110
00100 NEXT X
00110 FOR A=1TO 20:READ B$
00120 IF B$="999"GOTO 240
00130 ON A GOTO 150,160,150,160,150,160,150,160,150,160
00140 ON A-10GOTO 150,160,150,160,150,160,150,160
00150 PRINT TAB(5)B$,:GOTO 170
00160 PRINT TAB(40)B$
00170 NEXT A
00180 PRINT "IF YOU HAVE MORE VALUES FOR THIS PROGRAM"
00190 PRINT "TYPE 'YES'. IF YOU WISH TO GO TO THE MAIN LIST THEN"
00200 LINE INPUT "TYPE 'N0' ? ";M$
00210 IF M$="YES"THEN RETURN 
00220 IF M$="NO"GOTO 60
00230 GOTO 180
00240 PRINT :INPUT "WHAT ITEM NUMBER FROM MAIN LIST ? ";Q
00250 IF Q>18GOTO 240
00260 IF Q<1GOTO 240
00270 ON Q GOTO 390,1200,1480,1590,1730,1950,2010,2170,2300,950,1010
00280 ON Q-11GOTO 1050,1100,2640,1280,1370,500,610
00290 DATA "BLACK","BROWN","RED","ORANGE","YELLOW","GREEN"
00300 DATA "BLUE","VIOLET","GRAY","WHITE","777"
00310 DATA "1 PARALLEL RESISTORS","2 RESONANT FREQUENCY"
00320 DATA "3 SERIES CAPACITORS","4 REACTANCE","5 IMPEDANCE"
00330 DATA "6 ANTENNA LENGTH","7 OHMS LAW","8 POWER FORMULA"
00340 DATA "9 RESISTOR COLOR CODE","10 TRANSFORMER TURNS RATIO"
00350 DATA "11 DECIBELS","12 CONDUCTANCE","13 FREQUENCY TO TIME"
00360 DATA "14 TRANSMISSION LINE","15 ANT FIELD STRENGTH"
00370 DATA "16 PEAK RADAR PULSE POWER","17 PARALLEL INDUCTORS"
00380 DATA "18 PROGRAM CONVERSION TABLE","999"
00390 PRINT "THIS PROGRAM WILL CALCULATE PARALLEL RESISTORS"
00400 INPUT "HOW MANY RESISTORS ? ";R
00410 T=0:IF R>18GOTO 400
00420 IF R<2GOTO 400
00430 FOR X=1TO R:PRINT "RESISTOR VALUE ";X;" IN OHMS";
00440 INPUT " ? ";R1(X):IF X=R GOTO 460
00450 NEXT X
00460 FOR X=1TO R:T=T+(1/R1(X)):IF X=R GOTO 480
00470 NEXT X
00480 PRINT "TOTAL RESISTANCE IS ";1/T;" OHMS"
00490 GOSUB 180:PRINT :GOTO 400
00500 PRINT "THIS PROGRAM WILL CALCULATE PARALLEL INDUCTORS"
00510 INPUT "HOW MANY INDUCTORS ? ";L
00520 T=0:IF L>18 GOTO 510
00530 IF L<2GOTO 510
00540 FOR X=1TO L:PRINT "INDUCTOR VALUE ";X;" IN HENRYS";
00550 INPUT " ? ";L1(X):IF X=L GOTO 570
00560 NEXT X
00570 FOR X=1TO L:T=T+(1/L1(X)):IF X=L GOTO 590
00580 NEXT X
00590 PRINT "TOTAL INDUCTANCE IS ";1/T;" HENRYS"
00600 GOSUB 180:PRINT :GOTO 510
00610 PRINT "THIS PROGRAM WILL CONVERT ENTRIES (TO BE USED IN ";
00620 PRINT "MAIN PROGRAM) TO UNITS"
00630 PRINT "CONVERT ITEM"
00640 PRINT "(1)GIGA, (2)MEGA, (3)KILO, (4)MILLI, (5)MICRO,";
00650 PRINT " (6)NANO, OR (7)PICO"
00660 INPUT "TO UNITS ? ";U
00670 IF U=1GOTO 890
00680 IF U=2GOTO 740
00690 IF U=3GOTO 770
00700 IF U=4GOTO 800
00710 IF U=5GOTO 830
00720 IF U=6GOTO 920
00730 IF U=7GOTO 860
00740 INPUT "MEGA VALUE ? ";U
00750 PRINT "MEGA VALUE ";U;" IS ";U*1000000;" IN UNITS"
00760 GOSUB 180:PRINT :GOTO 630
00770 INPUT "KILO VALUE ? ";U
00780 PRINT "KILO VALUE ";U;" IS ";U*1000;" IN UNITS"
00790 GOSUB 180:PRINT :GOTO 630
00800 INPUT "MILLI VALUE ? ";U
00810 PRINT "MILLI VALUE ";U;" IS ";U*.001;" IN UNITS"
00820 GOSUB 180:PRINT :GOTO 630
00830 INPUT "MICRO VALUE ? ";U
00840 PRINT "MICRO VALUE ";U;" IS ";U*.000001;" IN UNITS"
00850 GOSUB 180:PRINT :GOTO 630
00860 INPUT "PICO VALUE ? ";U
00870 PRINT "PICO VALUE ";U;" IS ";U*.000000000001;" IN UNITS"
00880 GOSUB 180:PRINT :GOTO 630
00890 INPUT "GIGA VALUE ? ";U
00900 PRINT "GIGA VALUE ";U;" IS ";U*1000000000;" IN UNITS"
00910 GOSUB 180:PRINT :GOTO 630
00920 INPUT "NANO VALUE ? ";U
00930 PRINT "NANO VALUE ";U;" IS ";U*.000000001;" IN UNITS"
00940 GOSUB 180:PRINT :GOTO 630
00950 PRINT "THIS PROGRAM WILL CALCULATE SECONDARY VOLTAGE"
00960 INPUT "PRIMARY VOLTAGE ? ";P
00970 INPUT "SECONDARY TURNS ? ";S
00980 INPUT "PRIMARY TURNS ? ";P1
00990 PRINT "THE SECONDARY VOLTAGE IS ";P*(S/P1)
01000 GOSUB 180:PRINT :GOTO 960
01010 PRINT "THIS PROGRAM WILL CALCULATE DECIBEL RATIO OF TWO POWERS"
01020 INPUT "ENTER POWER ONE ? ";P1:INPUT "ENTER POWER TWO ? ";P2
01030 PRINT "THE DECIBEL VALUE IS ";10*(LOG(P1/P2)/LOG(10));" DB"
01040 GOSUB 180:PRINT :GOTO 1020
01050 PRINT "THIS PROGRAM WILL CALCULATE CONDUCTANCE IN MHOS"
01060 INPUT "WHAT IS THE RESISTANCE ? ";R
01070 IF R<=0GOTO 1060
01080 PRINT "THE CONDUCTANCE IS ";1/R;" MHOS"
01090 GOSUB 180:PRINT :GOTO 1060
01100 PRINT "THIS PROGRAM WILL CALCULATE FREQUENCY TO TIME"
01110 INPUT "IS FREQUENCY IN HZ (1) OR KHZ (2) ? ";M
01120 IF M=1GOTO 1150
01130 IF M=2GOTO 1170
01140 GOTO 1110
01150 INPUT "FREQUENCY IN HZ ? ";F
01160 PRINT "THE FREQUENCY IS EQUAL TO ";1/F;" SECONDS":GOTO 1190
01170 INPUT "FREQUENCY IN KHZ ? ";F
01180 PRINT "THE FREQUENCY IS EQUAL TO ";1/(F/1000);" MICROSECONDS"
01190 GOSUB 180:PRINT :GOTO 1110
01200 PRINT "THIS PROGRAM WILL CALCULATE RESONANT FREQUENCY"
01210 INPUT "INDUCTANCE IN HENRYS ? ";L
01220 INPUT "CAPACITANCE IN FARADS ? ";C
01230 P=2*(4*ATN(1)):P=P*(SQR(L*C)):P=1/P
01240 PRINT "THE RESONANT FREQUENCY IS ";P;" HZ"
01250 A=P/1000:B=A/1000:C=B/1000
01260 PRINT "IN KHZ";A;" IN MHZ";B;" IN GEGA HZ";C
01270 GOSUB 180:PRINT :GOTO 1210
01280 PRINT "THIS PROGRAM WILL CALCULATE FIELD STRENGTH"
01290 PRINT "AT MODERATE DISTANCES FROM THE TRANSMITTING ANTENNA"
01300 INPUT "WHAT IS THE EFFECTIVE ANTENNA HEIGHT IN METERS ? ";B
01310 INPUT "WHAT IS THE ANTENNA CURRENT IN AMPERES ? ";I
01320 INPUT "WHAT IS THE OPERATING WAVELENGTH IN METERS ? ";W
01330 INPUT "WHAT IS THE DISTANCE FROM ANTENNA IN METERS ? ";R
01340 E=(188*B*I)/(W*R)
01350 PRINT "THE FIELD STRENGTH IS ";E;" MILLIVOLTS PER METER"
01360 GOSUB 180:PRINT :GOTO 1300
01370 PRINT "THIS PROGRAM WILL CALCULATE THE PEAK"
01380 PRINT "POWER OF A RADAR PULSE"
01390 INPUT "WHAT IS THE PULSE WIDTH IN MICROSECONDS ? ";W
01400 INPUT "WHAT IS THE PULSE REPETION RATE ? ";R
01410 INPUT "WHAT IS THE AVERAGE POWER IN WATTS ? ";P
01420 D1=1/R:W1=W/1000000
01430 D1=W1/D1
01440 P1=P/D1:REM PEAK POWER
01450 PRINT "THE PEAK POWER IS ";P1;" WATTS"
01460 PRINT "THE DUTY CYCLE IS ";D1
01470 GOSUB 180:PRINT :GOTO 1370
01480 PRINT "THIS PROGRAM WILL CALCULATE SERIES CAPACITORS"
01490 INPUT "HOW MANY CAPACITORS ? ";C
01500 T=0:IF C>18GOTO 1490
01510 IF C<2GOTO 1490
01520 FOR X=1TO C:PRINT "CAPACITOR VALUE ";X;" IN FARADS";
01530 INPUT " ? ";C1(X):IF X=C GOTO 1550
01540 NEXT X
01550 FOR X=1TO C:T=T+(1/C1(X)):IF X=C GOTO 1570
01560 NEXT X
01570 PRINT "TOTAL CAPACITANCE IS ";1/T;" FARADS"
01580 GOSUB 180:PRINT :GOTO 1490
01590 PRINT "THIS PROGRAM WILL CALCULATE INDUCTIVE AND CAPACITIVE ";
01600 PRINT "REACTANCE"
01610 INPUT "SOLVE FOR INDUCTIVE (1) OR CAPACITIVE (2) REACTANCE ? ";R
01620 IF R=2GOTO 1680
01630 PRINT "SOLVE FOR INDUCTIVE REACTANCE"
01640 INPUT "FREQUENCY IN HERTZ ? ";F
01650 INPUT "INDUCTANCE IN HENRYS ? ";L
01660 P=2*(4*ATN(1))
01670 PRINT "THE INDUCTIVE REACTANCE IS ";P*(F*L);" OHMS":GOTO 1720
01680 PRINT "SOLVE FOR CAPACITIVE REACTANCE"
01690 INPUT "FREQUENCY IN HERTZ ? ";F
01700 INPUT "CAPACITANCE IN FARADS ? ";C
01710 PRINT "THE CAPACITIVE REACTANCE IS ";1/(3.1416*(F*C));" OHMS"
01720 GOSUB 180:PRINT :GOTO 1610
01730 PRINT "THIS PROGRAM WILL CALCULATE SERIES OR PARALLEL IMPEDANCE"
01740 INPUT "SERIES (1) OR PARALLEL (2) CIRCUIT ? ";Q
01750 IF Q=2GOTO 1860
01760 INPUT "RESISTANCE VALUE IN OHMS ? ";R
01770 INPUT "CAPACITANCE VALUE IN FARADS ? ";C
01780 INPUT "INDUCTANCE VALUE IN HENRYS ? ";L
01790 IF C=L THEN Z=R:GOTO 1840
01800 IF L>C GOTO 1820
01810 IF C>L GOTO 1830
01820 Z=L-C:Z=Z*Z:Z=Z+(R*R):Z=SQR(Z):GOTO 1840
01830 Z=C-L:Z=Z*Z:Z=Z+(R*R):Z=SQR(Z)
01840 PRINT "THE IMPEDANCE IS ";Z;" OHMS"
01850 GOTO 1940
01860 INPUT "RESISTANCE VALUE IN OHMS ? ";R
01870 INPUT "CAPACITANCE VALUE IN FARADS ? ";C
01880 INPUT "INDUCTANCE VALUE IN HENRYS ? ";L
01890 A=12/R:B=12/C:C=12/L
01900 IF B>C THEN X=B-C
01910 IF C>B THEN X=C-B
01920 T=A*A:X=X*X
01930 PRINT "THE IMPEDANCE IS ";12/(SQR(T+X));" OHMS"
01940 GOSUB 180:PRINT :GOTO 1740
01950 PRINT "THIS PROGRAM WILL CALCULATE ANTENNA LENGTH"
01960 INPUT "FREQUENCY IN MHZ ? ";F
01970 A=468/F:PRINT "THE HALF WAVE ANTENNA LENGTH IS ";A;" FEET";
01980 PRINT " OR ";:PRINT A*12;:PRINT " INCHES"
01990 PRINT "OPERATION WILL BE IN THE ";300/F;" METER BAND"
02000 GOSUB 180:PRINT :GOTO 1960
02010 PRINT "THIS PROGRAM WILL CALCULATE OHMS LAW"
02020 LINE INPUT "SOLVE FOR WHAT UNIT (E),(I), OR (R) ? ";U$
02030 IF U$="E"GOTO 2070
02040 IF U$="I"GOTO 2100
02050 IF U$="R"GOTO 2130
02060 GOTO 2020
02070 INPUT "CURRENT VALUE ? ";I
02080 INPUT "RESISTANCE VALUE ? ";R
02090 A=I*R:PRINT "THE VOLTAGE IS ";A:GOTO 2160
02100 INPUT "VOLTAGE VALUE ? ";E
02110 INPUT "RESISTANCE VALUE ? ";R
02120 A=E/R:PRINT "THE CURRENT IS ";A:GOTO 2160
02130 INPUT "VOLTAGE VALUE ? ";E
02140 INPUT "CURRENT VALUE ? ";I
02150 A=E/I:PRINT "THE RESISTANCE IS ";A
02160 GOSUB 180:PRINT :GOTO 2020
02170 PRINT "THIS PROGRAM WILL CALCULATE FOR POWER"
02180 INPUT "WHAT TWO UNITS (1)I&R, (2)E&R, (3)E&I ? ";U
02190 IF U=1GOTO 2230
02200 IF U=2GOTO 2250
02210 IF U=3GOTO 2270
02220 GOTO 2180
02230 INPUT "VALUE OF I,R ? ";A,B
02240 PRINT "POWER EQUALS ";B*(A*A);" WATTS":GOTO 2290
02250 INPUT "VALUE OF E,R ? ";A,B
02260 PRINT "POWER EQUALS ";B/(A*A);" WATTS":GOTO 2290
02270 INPUT "VALUE OF E,I ? ";A,B
02280 PRINT "POWER EQUALS ";A*B;" WATTS"
02290 GOSUB 180:PRINT :GOTO 2180
02300 PRINT "THIS PROGRAM WILL CALCULATE THE RESISTOR COLOR CODE"
02310 LINE INPUT "FIRST COLOR ? ";C1$
02320 RESTORE :A=0:FOR X=1TO 12
02330 READ Q$:IF Q$=C1$THEN A=A:GOTO 2360
02340 IF Q$="777"GOTO 2310
02350 A=A+10:NEXT X
02360 LINE INPUT "SECOND COLOR ? ";C2$
02370 RESTORE :B=0:FOR X=1TO 12
02380 READ R$:IF R$=C2$THEN B=B:GOTO 2410
02390 IF R$="777"GOTO 2360
02400 B=B+1:NEXT X
02410 LINE INPUT "THIRD COLOR ? ";C3$
02420 IF C3$="GOLD"THEN C=.1:GOTO 2480
02430 IF C3$="SILVER"THEN C=.01:GOTO 2480
02440 RESTORE :C=1:FOR X=1TO 12
02450 READ S$:IF S$=C3$THEN C=C:GOTO 2480
02460 IF S$="777"GOTO 2410
02470 C=C*10:NEXT X
02480 K=C*(A+B):PRINT "THE RESISTANCE IS ";K;" OHMS"
02490 S=K
02500 K=K/1000:PRINT "OR ";K;" KILO OHMS"
02510 K=K/1000:PRINT "OR ";K;" MEGA OHMS"
02520 K=K/1000:PRINT "OR ";K;" GIGA OHMS"
02530 PRINT "ENTRIES FOR NEXT QUESTION (NONE, SILVER, OR GOLD)"
02540 LINE INPUT "FOURTH COLOR ? ";C4$
02550 IF C4$="NONE"GOTO 2580
02560 IF C4$="SILVER"GOTO 2590
02570 IF C4$="GOLD"GOTO 2600
02580 M=.20*S:GOTO 2620
02590 M=.10*S:GOTO 2620
02600 M=.05*S:GOTO 2620
02610 GOSUB 180:PRINT :GOTO 2310
02620 PRINT "THE RESISTOR TOLERANCE IS ";M
02630 PRINT "THE TOLERANCE RANGE IS ";S-M;" TO ";S+M;" OHMS":GOTO 2610
02640 PRINT "THIS PROGRAM WILL CALCULATE THE CHARACTERISTIC"
02650 PRINT "IMPEDANCE OF TRANSMISSION LINES"
02660 LINE INPUT "IS TRANSMISSION LINE TWO WIRE PARALLEL ? ";X$
02670 IF X$="YES"GOTO 2710
02680 LINE INPUT "IS TRANSMISSION LINE A COAXIAL LINE ? ";X$
02690 IF X$="YES"GOTO 2770
02700 PRINT :PRINT "TYPE 'YES' FOR ONE OF THE QUESTIONS":GOTO 2660
02710 PRINT :PRINT "PARALLEL TRANSMISSION LINE"
02720 INPUT "WHAT IS THE SPACING BETWEEN CONDUCTORS IN INCHES ? ";A
02730 INPUT "WHAT IS THE RADIUS OF ONE CONDUCTOR IN INCHES ? ";B
02740 Z=276*(LOG(A/B))
02750 PRINT :PRINT "THE IMPEDANCE IS ";Z;" OHMS"
02760 GOSUB 180:PRINT :GOTO 2660
02770 PRINT :PRINT "COAXIAL TRANSMISSION LINE"
02780 PRINT "WHAT IS THE INNER DIAMETER OF THE OUTER CONDUCTOR"
02790 INPUT "IN INCHES ? ";A
02800 PRINT "WHAT IS THE OUTER DIAMETER OF THE INNER CONDUCTOR"
02810 INPUT "IN INCHES ? ";B
02820 Z=138*(LOG(A/B)):Z=Z*.675
02830 PRINT :PRINT "THE IMPEDANCE IS ";Z;" OHMS"
02840 GOSUB 180:PRINT :GOTO 2660
