-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
174 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,149 @@ | ||
100 REM THIS IS PROGRAM NO. 29 PROG29 | ||
105 V1 = 0 | ||
106 V2 = 0 | ||
107 I1 = 0 | ||
108 I2 = 0 | ||
109 P1 = 0 | ||
110 P2 = 0 | ||
120 PRINT "WHICH OF THE FOLLOWING IS REQUIRED?" | ||
130 PRINT | ||
140 PRINT "1. DECIBEL CONVERSION GIVEN" | ||
145 PRINT " VOLTAGE, CURRENT OR POWER" | ||
146 PRINT " RATIOS." | ||
147 PRINT | ||
150 PRINT "2. VOLTAGE, CURRENT OR POWER" | ||
155 PRINT " RATIOS NEEDED FOR GIVEN" | ||
158 PRINT " DECIBEL LEVEL." | ||
160 PRINT | ||
170 PRINT "SELECT ONE FROM ABOVE AND PRESS CR..." | ||
180 INPUT S | ||
185 PRINT S | ||
190 IF S > 2 THEN GOTO 120 | ||
200 ON S GOTO 210,600 | ||
210 GOSUB 1000 | ||
220 PRINT "WHICH CALCULATION IS DESIRED?" | ||
230 PRINT | ||
240 PRINT "1. VOLTAGE RATIO" | ||
250 PRINT "2. CURRENT RATIO" | ||
260 PRINT "3. POWER RATIO" | ||
270 PRINT | ||
280 PRINT "SELECT ONE FROM ABOVE AND PRESS CR..." | ||
290 INPUT Q | ||
295 PRINT Q | ||
300 IF Q > 3 THEN GOTO 220 | ||
310 ON Q GOTO 320,390,460 | ||
320 GOSUB 960 | ||
330 PRINT "ENTER V1:" | ||
340 INPUT V1 | ||
345 PRINT V1 | ||
347 PRINT | ||
350 PRINT "ENTER V2:" | ||
360 INPUT V2 | ||
365 PRINT V2 | ||
367 PRINT | ||
370 DB = 20*(LOG(V1/V2)/LOG(10)) | ||
380 GOTO 520 | ||
390 GOSUB 960 | ||
400 PRINT "ENTER I1:" | ||
410 INPUT I1 | ||
415 PRINT I1 | ||
418 PRINT | ||
420 PRINT "ENTER I2:" | ||
430 INPUT I2 | ||
435 PRINT I2 | ||
438 PRINT | ||
440 DB = 20*(LOG(I1/I2)/LOG(10)) | ||
450 GOTO 520 | ||
460 GOSUB 960 | ||
470 PRINT "ENTER P1:" | ||
480 INPUT P1 | ||
485 PRINT P1 | ||
490 PRINT "ENTER P2:" | ||
500 INPUT P2 | ||
505 PRINT P2 | ||
508 PRINT | ||
510 DB = 10*(LOG(P1/P2)/LOG(10)) | ||
520 PRINT | ||
530 DB = DB*100 | ||
540 DB = INT(DB) | ||
550 DB = DB/100 | ||
560 PRINT "RATIO REPRESENTS: ";DB;" DB" | ||
570 PRINT | ||
580 GOSUB 1040 | ||
590 GOTO 1070 | ||
600 GOSUB 1000 | ||
610 PRINT "SELECT ONE FROM MENU BELOW:" | ||
620 PRINT | ||
630 PRINT "1. VOLTAGE RATIO" | ||
640 PRINT "2. CURRENT RATIO" | ||
650 PRINT "3. POWER RATIO" | ||
660 PRINT | ||
670 PRINT "SELECT ONE FROM MENU BELOW:" | ||
620 PRINT | ||
630 PRINT "1. VOLTAGE RATIO" | ||
640 PRINT "2. CURRENT RATIO" | ||
650 PRINT "3. POWER RATIO" | ||
660 PRINT | ||
670 PRINT "ENTER ONE FROM ABOVE AND PRESS CR..." | ||
680 INPUT L | ||
685 PRINT L | ||
688 PRINT | ||
690 IF L > 3 THEN GOTO 610 | ||
700 GOSUB 960 | ||
710 PRINT "ENTER NUMBER OF DECIBELS:" | ||
720 INPUT DB | ||
725 PRINT DB | ||
738 PRINT | ||
740 ON L GOTO 750,770,790 | ||
750 RA = (10^(DB/20)) | ||
760 GOTO 800 | ||
770 RA = (10^(DB/20)) | ||
780 GOTO 800 | ||
790 RA = (10^(DB/10)) | ||
800 PRINT | ||
810 RA = RA*100 | ||
820 RA = INT(RA) | ||
830 RA = RA/100 | ||
840 PRINT | ||
850 PRINT DB;" DB REPRESENTS A" | ||
860 ON L GOTO 870,890,910 | ||
870 PRINT "VOLTAGE RATIO OF ";RA;":1" | ||
880 GOTO 930 | ||
890 PRINT "CURRENT RATIO OF ";RA;":1" | ||
900 GOTO 930 | ||
910 PRINT "POWER RATIO OF ";RA;":1" | ||
920 GOTO 930 | ||
930 PRINT | ||
940 GOSUB 1040 | ||
950 GOTO 1070 | ||
960 FOR I = 1 TO 5 | ||
970 PRINT | ||
980 NEXT I | ||
990 RETURN | ||
1000 FOR I = 1 TO 30 | ||
1010 PRINT | ||
1020 NEXT I | ||
1030 RETURN | ||
1040 PRINT "PRESS CR TO CONTINUE..." | ||
1050 INPUT KK | ||
1055 PRINT KK | ||
1058 PRINT | ||
1060 RETURN | ||
1070 GOSUB 1000 | ||
1080 PRINT "FINISHED?" | ||
1090 PRINT | ||
1100 PRINT "1. YES" | ||
1110 PRINT "2. NO" | ||
1120 PRINT | ||
1130 PRINT "SELECT ONE FROM ABOVE AND PRESS CR..." | ||
1140 INPUT Z | ||
1145 PRINT Z | ||
1150 IF Z > 2 THEN GOTO 1080 | ||
1160 ON Z GOTO 1170,110 | ||
1170 GOSUB 1000 | ||
1180 FOR I = 1 TO 20 | ||
1190 PRINT "********** BYE-BYE ********" | ||
1200 NEXT I | ||
1210 GOSUB 960 | ||
1220 PRINT "PROGRAM ENDED" | ||
1290 END |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,23 @@ | ||
10 QU$ = CHR$(34) | ||
12 PRINT CHR$(147);CHR$(155);"FROM THE BOOK ";QU$;"COMMODORE 64 & 128" | ||
14 PRINT "PROGRAMS FOR AMATEUR RADIO &ELECTRONICS";QU$; | ||
16 PRINT " BY JOSEPH J. CARR" | ||
18 PRINT CHR$(5) | ||
20 PRINT "LOAD ";QU$;"COIL-LOADED-SHOR";QU$;",8" | ||
22 PRINT "LOAD ";QU$;"RESISTORS-IN-SER";QU$;",8" | ||
24 PRINT "LOAD ";QU$;"CAPACITORS-IN-SE";QU$;",8" | ||
26 PRINT "LOAD ";QU$;"INDUCTORS-IN-SER";QU$;",8" | ||
28 PRINT "LOAD ";QU$;"ZENER-DIODE-VOLT";QU$;",8" | ||
30 PRINT "LOAD ";QU$;"RLC-NETWORKS";QU$;",8" | ||
32 PRINT | ||
34 PRINT | ||
36 PRINT | ||
38 PRINT | ||
40 PRINT "RUN" | ||
IV=65534:REM INTERRUPT VECTOR | ||
SC=65375:REM SCREEN/SWAPPER | ||
REM SET 40 COL FOR CX16 AND C128 | ||
IF PEEK(IV)=35 THEN POKE 780,0:SYS SC | ||
IF PEEK(IV)=23 AND PEEK(215)=128 THEN SYS SC | ||
REM MENU | ||
QU$ = CHR$(34) | ||
PRINT CHR$(147);CHR$(155);"FROM THE BOOK ";QU$;"COMMODORE 64 & 128" | ||
PRINT "PROGRAMS FOR AMATEUR RADIO &ELECTRONICS";QU$; | ||
PRINT " BY JOSEPH J. CARR" | ||
PRINT CHR$(5) | ||
PRINT "LOAD";QU$;"COIL-LOADED-SHOR";QU$;",8" | ||
PRINT "LOAD";QU$;"RESISTORS-IN-SER";QU$;",8" | ||
PRINT "LOAD";QU$;"CAPACITORS-IN-SE";QU$;",8" | ||
PRINT "LOAD";QU$;"INDUCTORS-IN-SER";QU$;",8" | ||
PRINT "LOAD";QU$;"ZENER-DIODE-VOLT";QU$;",8" | ||
PRINT "LOAD";QU$;"RLC-NETWORKS";QU$;",8" | ||
PRINT "LOAD";QU$;"DECIBEL-CALC";QU$;",8" | ||
PRINT "RUN" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,11 @@ | ||
#!/bin/sh | ||
# petcat and c1541 are included in VICE 2.4 - 3.5 | ||
rm *.d64 | ||
rm *.prg | ||
ls *.bas | sed 's/\.bas//' | while read p | ||
do cat $p.bas | awk '{print tolower($0)}' | petcat -w2 -o $p.prg | ||
done | ||
c1541 -format amateur-radio_m6,00 d64 amateur-radio-electronics.d64 | ||
printf "menu\ncoil-loaded-shortened-dipol-antenna\nresistors-in-series-or-parallel\ncapacitors-in-series-or-parallel\ninductors-in-series-or-parallel\nzener-diode-voltage-regulator-design\nrlc-networks\n" | while read p | ||
printf "menu\ncoil-loaded-shortened-dipol-antenna\nresistors-in-series-or-parallel\ncapacitors-in-series-or-parallel\ninductors-in-series-or-parallel\nzener-diode-voltage-regulator-design\nrlc-networks\ndecibel-calc\n" | while read p | ||
do c1541 -attach amateur-radio-electronics.d64 -write $p.prg $p | ||
done | ||
rm *.prg |