home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
HAM Radio 3
/
hamradioversion3.0examsandprograms1992.iso
/
control
/
frg960
/
frg9600.txt
< prev
next >
Wrap
Text File
|
1989-07-29
|
12KB
|
673 lines
DECLARE SUB infreqh ()
DECLARE SUB infreql ()
DECLARE SUB infreq ()
DECLARE SUB normal ()
DECLARE SUB low ()
DECLARE SUB high ()
'FRG-9600 CONTROL PROGRAM
SCREEN 0
COLOR 0, 15
'Set Com: Port
CLS
LOCATE 10, 25
PRINT " WHICH COM: PORT ? ( 1 or 2 )";
DO
FLAG = 1
Z$ = INPUT$(1)
SELECT CASE Z$
CASE "1"
c$ = "COM1:4800,N,8,2"
CASE "2"
c$ = "COM2:4800,N,8,2"
CASE ELSE
FLAG = 0
END SELECT
LOOP WHILE FLAG = 0
CLS
OPEN c$ FOR RANDOM AS #1
LOCATE 2, 25
PRINT "FRG-9600 CONTROL PROGRAM";
LOCATE 8, 25
PRINT "{1} 60 Mhz to 900 Mhz";
LOCATE 12, 25
PRINT "{2} 20 Hz to 60 Mhz";
LOCATE 16, 25
PRINT "{3} 900 Mhz to 1300 Mhz";
LOCATE 22, 20
PRINT "Select a Frequency Range : ";
2 i$ = INPUT$(1)
SELECT CASE i$
CASE "1"
CALL normal
CASE "2"
CALL low
CASE "3"
CALL high
CASE ELSE
GOTO 2
END SELECT
SUB high
DEFSNG F
SCREEN 0
COLOR 1, 15
CLS
LOCATE 10, 25
PRINT "TURN ON FC-1300 CONVERTER"
FOR count = 1 TO 3000
NEXT count
SCREEN 0
COLOR 1, 15
CLS
LOCATE 2, 25
PRINT "FRG-9600 CONTROL PROGRAM";
LOCATE 3, 25
PRINT "( 800 Mhz. to 1300 Mhz. )";
LOCATE 9, 10
PRINT "{U} USB";
LOCATE 11, 10
PRINT "{L} LSB";
LOCATE 13, 10
PRINT "{A} AM - Wide";
LOCATE 15, 10
PRINT "{F} FM - Narrow";
LOCATE 17, 10
PRINT "{N} AM - Narrow";
LOCATE 19, 10
PRINT "{W} FM - Wide";
LOCATE 22, 10
PRINT "{Q} Quit";
LOCATE 7, 10
PRINT "{E} Enter Frequency: ";
COLOR 2, 0
LOCATE 13, 51
PRINT " "
COLOR 4, 15
LOCATE 14, 53
PRINT "Mode"
DO
DO
COLOR 0, 15
i$ = INKEY$
LOCATE 5, 27
PRINT DATE$; " "; TIME$;
LOOP WHILE i$ = ""
LOCATE 13, 52
COLOR 2, 0
SELECT CASE i$
CASE "U", "u"
PRINT #1, CHR$(17);
FOR x = 1 TO 4
PRINT #1, CHR$(1);
NEXT x
PRINT " USB "
CASE "L", "l"
PRINT #1, CHR$(16);
FOR x = 1 TO 4
PRINT #1, CHR$(1);
NEXT x
PRINT " LSB "
CASE "A", "a"
PRINT #1, CHR$(21);
FOR x = 1 TO 4
PRINT #1, CHR$(1);
NEXT x
PRINT "AM - W"
CASE "F", "f"
PRINT #1, CHR$(22);
FOR x = 1 TO 4
PRINT #1, CHR$(1);
NEXT x
PRINT "FM - N"
CASE "N", "n"
PRINT #1, CHR$(20);
FOR x = 1 TO 4
PRINT #1, CHR$(1);
NEXT x
PRINT "AM - N"
CASE "W", "w"
PRINT #1, CHR$(23);
FOR x = 1 TO 4
PRINT #1, CHR$(1);
NEXT x
PRINT "FM - W"
CASE "Q", "q"
CLOSE #1
CLS
LOCATE 10, 25
PRINT " Created by R.A. Harris WB4HRH";
FOR count = 1 TO 3000
NEXT count
END
CASE "e", "E"
CALL infreqh
END SELECT
LOOP
CLOSE #1
END SUB
SUB infreq
CR$ = CHR$(&HD)
BS$ = CHR$(8)
DIM i$(8)
COLOR 2, 0
LOCATE 7, 32
PRINT " ";
'ENTER AND PRINT
N = 1
DO 'MAIN ROUTINE
IF N = 0 THEN N = 1
DO 'INPUT ROUTINE
FLAG = 1
i$(N) = INPUT$(1)
IF i$(N) < "0" THEN FLAG = 0
IF i$(N) > "9" THEN FLAG = 0
IF i$(N) = BS$ THEN
FLAG = 1
N = N - 1
i$(N) = " "
END IF
IF i$(N) = CR$ THEN FLAG = 1
LOOP WHILE FLAG = 0
IF i$(N) = CR$ THEN EXIT DO
LOCATE 7, 32
PRINT " "
LOCATE 7, 32
IF N = 1 THEN PRINT i$(1) + " " + " " + ".";
IF N = 2 THEN PRINT i$(1) + i$(2) + " " + ".";
IF N = 3 THEN PRINT i$(1) + i$(2) + i$(3) + ".";
IF N = 4 THEN PRINT i$(1) + i$(2) + i$(3) + "." + i$(4);
IF N = 5 THEN PRINT i$(1) + i$(2) + i$(3) + "." + i$(4) + i$(5);
IF N = 6 THEN PRINT i$(1) + i$(2) + i$(3) + "."; i$(4) + i$(5) + i$(6) + ".";
IF N = 7 THEN PRINT i$(1) + i$(2) + i$(3) + "." + i$(4) + i$(5) + i$(6) + "." + i$(7);
IF i$(N) = " " THEN N = N ELSE N = N + 1
LOOP WHILE N < 7
N = N - 1
FOR x = N + 1 TO 8
i$(x) = "0"
NEXT x
N = 7
COLOR 4, 15
LOCATE 10, 50
PRINT "Frequency"
COLOR 2, 0
LOCATE 9, 49
PRINT " ";
LOCATE 9, 50
IF N = 7 THEN PRINT i$(1) + i$(2) + i$(3) + "." + i$(4) + i$(5) + i$(6) + "." + i$(7);
COLOR 2, 15
LOCATE 7, 32
PRINT " ";
'SEND INPUT TO RADIO
PRINT #1, CHR$(10);
FOR x = 1 TO 7 STEP 2
TWO$ = "&H" + i$(x) + i$(x + 1)
d = VAL(TWO$)
PRINT #1, CHR$(d);
NEXT x
COLOR 1, 15
END SUB
SUB infreqh
CR$ = CHR$(&HD)
BS$ = CHR$(8)
DIM i$(8)
6 COLOR 2, 0
LOCATE 7, 32
PRINT " ";
'ENTER AND PRINT
N = 0
DO 'MAIN ROUTINE
IF N = -1 THEN N = 0
DO 'INPUT ROUTINE
FLAG = 1
i$(N) = INPUT$(1)
IF i$(N) < "0" THEN FLAG = 0
IF i$(0) > "1" THEN FLAG = 0
IF i$(N) = BS$ THEN
FLAG = 1
N = N - 1
i$(N) = " "
END IF
IF i$(N) = CR$ THEN FLAG = 1
LOOP WHILE FLAG = 0
IF i$(N) = CR$ THEN EXIT DO
LOCATE 7, 32
PRINT " "
LOCATE 7, 32
IF N = 0 THEN PRINT i$(0) + " " + " " + " " + ".";
IF N = 1 THEN PRINT i$(0) + i$(1) + " " + " " + ".";
IF N = 2 THEN PRINT i$(0) + i$(1) + i$(2) + " " + ".";
IF N = 3 THEN PRINT i$(0) + i$(1) + i$(2) + i$(3) + ".";
IF N = 4 THEN PRINT i$(0) + i$(1) + i$(2) + i$(3) + "." + i$(4);
IF N = 5 THEN PRINT i$(0) + i$(1) + i$(2) + i$(3) + "." + i$(4) + i$(5);
IF N = 6 THEN PRINT i$(0) + i$(1) + i$(2) + i$(3) + "."; i$(4) + i$(5) + i$(6) + ".";
IF N = 7 THEN PRINT i$(0) + i$(1) + i$(2) + i$(3) + "." + i$(4) + i$(5) + i$(6) + "." + i$(7);
IF i$(N) = " " THEN N = N ELSE N = N + 1
LOOP WHILE N < 8
N = N - 1
FOR x = N + 1 TO 8
i$(x) = "0"
NEXT x
N = 7
COLOR 4, 15
LOCATE 10, 50
PRINT "Frequency"
COLOR 2, 0
LOCATE 9, 49
PRINT " ";
LOCATE 9, 50
IF N = 7 THEN PRINT i$(0) + i$(1) + i$(2) + i$(3) + "." + i$(4) + i$(5) + i$(6) + "." + i$(7);
COLOR 2, 15
LOCATE 7, 32
PRINT " ";
IF i$(0) = "0" AND VAL(i$(1)) < 8 THEN GOTO 5
IF i$(0) = "1" AND i$(1) = "3" THEN i$(1) = "9"
IF i$(0) = "1" AND i$(1) = "2" THEN i$(1) = "8"
IF i$(0) = "1" AND i$(1) = "1" THEN i$(1) = "7"
IF i$(0) = "1" AND i$(1) = "0" THEN i$(1) = "6"
IF i$(0) = "0" AND i$(1) = "9" THEN i$(1) = "5"
IF i$(0) = "0" AND i$(1) = "8" THEN i$(1) = "4"
'SEND INPUT TO RADIO
PRINT #1, CHR$(10);
FOR x = 1 TO 7 STEP 2
TWO$ = "&H" + i$(x) + i$(x + 1)
d = VAL(TWO$)
PRINT #1, CHR$(d);
NEXT x
COLOR 1, 15
GOTO 7
5 LOCATE 9, 49
PRINT " ";
LOCATE 9, 50
COLOR 4, 0
PRINT " TOO LOW ";
FOR count = 1 TO 2000
NEXT count
LOCATE 9, 50
COLOR 2, 15
PRINT " ";
GOTO 6
7 END SUB
SUB infreql
CR$ = CHR$(&HD)
BS$ = CHR$(8)
DIM i$(8)
COLOR 2, 0
LOCATE 7, 32
PRINT " ";
'ENTER AND PRINT
N = 2
DO 'MAIN ROUTINE
IF N = 1 THEN N = 2
DO 'INPUT ROUTINE
FLAG = 1
i$(N) = INPUT$(1)
IF i$(N) < "0" THEN FLAG = 0
IF i$(2) > "6" THEN FLAG = 0
IF i$(N) = BS$ THEN
FLAG = 1
N = N - 1
i$(N) = " "
END IF
IF i$(N) = CR$ THEN FLAG = 1
LOOP WHILE FLAG = 0
IF i$(N) = CR$ THEN EXIT DO
LOCATE 7, 32
PRINT " "
LOCATE 7, 32
IF N = 1 THEN PRINT i$(1) + " " + " " + ".";
IF N = 2 THEN PRINT i$(1) + i$(2) + " " + ".";
IF N = 3 THEN PRINT i$(1) + i$(2) + i$(3) + ".";
IF N = 4 THEN PRINT i$(1) + i$(2) + i$(3) + "." + i$(4);
IF N = 5 THEN PRINT i$(1) + i$(2) + i$(3) + "." + i$(4) + i$(5);
IF N = 6 THEN PRINT i$(1) + i$(2) + i$(3) + "."; i$(4) + i$(5) + i$(6) + ".";
IF N = 7 THEN PRINT i$(1) + i$(2) + i$(3) + "." + i$(4) + i$(5) + i$(6) + "." + i$(7);
IF i$(N) = " " THEN N = N ELSE N = N + 1
LOOP WHILE N < 8
N = N - 1
FOR x = N + 1 TO 8
i$(x) = "0"
NEXT x
N = 7
COLOR 4, 15
LOCATE 10, 50
PRINT "Frequency"
COLOR 2, 0
LOCATE 9, 49
PRINT " ";
LOCATE 9, 50
IF N = 7 THEN PRINT i$(1) + i$(2) + i$(3) + "." + i$(4) + i$(5) + i$(6) + "." + i$(7);
COLOR 2, 15
LOCATE 7, 32
PRINT " ";
t = VAL(i$(2))
t = t + 6
i$(2) = STR$(t)
i$(2) = RIGHT$(i$(2), 1)
i$(1) = "0"
IF t > 9 THEN
i$(1) = "1"
i$(2) = STR$(t)
i$(2) = RIGHT$(i$(2), 1)
END IF
'SEND INPUT TO RADIO
PRINT #1, CHR$(10);
FOR x = 1 TO 7 STEP 2
TWO$ = "&H" + i$(x) + i$(x + 1)
d = VAL(TWO$)
PRINT #1, CHR$(d);
NEXT x
COLOR 1, 15
END SUB
SUB low
DEFSNG F
SCREEN 0
COLOR 1, 15
CLS
LOCATE 10, 25
PRINT "TURN ON FC-965DX CONVERTER"
FOR count = 1 TO 3000
NEXT count
SCREEN 0
COLOR 1, 15
CLS
LOCATE 2, 25
PRINT "FRG-9600 CONTROL PROGRAM";
LOCATE 3, 26
PRINT "( 20 Khz. to 60 Mhz. )";
LOCATE 9, 10
PRINT "{U} USB";
LOCATE 11, 10
PRINT "{L} LSB";
LOCATE 13, 10
PRINT "{A} AM - Wide";
LOCATE 15, 10
PRINT "{F} FM - Narrow";
LOCATE 17, 10
PRINT "{N} AM - Narrow";
LOCATE 19, 10
PRINT "{W} FM - Wide";
LOCATE 22, 10
PRINT "{Q} Quit";
LOCATE 7, 10
PRINT "{E} Enter Frequency: ";
COLOR 2, 0
LOCATE 13, 51
PRINT " "
COLOR 4, 15
LOCATE 14, 53
PRINT "Mode"
DO
DO
COLOR 0, 15
i$ = INKEY$
LOCATE 5, 27
PRINT DATE$; " "; TIME$;
LOOP WHILE i$ = ""
LOCATE 13, 52
COLOR 2, 0
SELECT CASE i$
CASE "U", "u"
PRINT #1, CHR$(17);
FOR x = 1 TO 4
PRINT #1, CHR$(1);
NEXT x
PRINT " USB "
CASE "L", "l"
PRINT #1, CHR$(16);
FOR x = 1 TO 4
PRINT #1, CHR$(1);
NEXT x
PRINT " LSB "
CASE "A", "a"
PRINT #1, CHR$(21);
FOR x = 1 TO 4
PRINT #1, CHR$(1);
NEXT x
PRINT "AM - W"
CASE "F", "f"
PRINT #1, CHR$(22);
FOR x = 1 TO 4
PRINT #1, CHR$(1);
NEXT x
PRINT "FM - N"
CASE "N", "n"
PRINT #1, CHR$(20);
FOR x = 1 TO 4
PRINT #1, CHR$(1);
NEXT x
PRINT "AM - N"
CASE "W", "w"
PRINT #1, CHR$(23);
FOR x = 1 TO 4
PRINT #1, CHR$(1);
NEXT x
PRINT "FM - W"
CASE "Q", "q"
CLOSE #1
CLS
LOCATE 10, 25
PRINT " Created by R.A. Harris WB4HRH";
FOR count = 1 TO 3000
NEXT count
END
CASE "e", "E"
CALL infreql
END SELECT
LOOP
CLOSE #1
END SUB
SUB normal
DEFSNG F
SCREEN 0
COLOR 1, 15
CLS
LOCATE 2, 25
PRINT "FRG-9600 CONTROL PROGRAM";
LOCATE 9, 10
PRINT "{U} USB";
LOCATE 11, 10
PRINT "{L} LSB";
LOCATE 13, 10
PRINT "{A} AM - Wide";
LOCATE 15, 10
PRINT "{F} FM - Narrow";
LOCATE 17, 10
PRINT "{N} AM - Narrow";
LOCATE 19, 10
PRINT "{W} FM - Wide";
LOCATE 22, 10
PRINT "{Q} Quit";
LOCATE 7, 10
PRINT "{E} Enter Frequency: ";
COLOR 2, 0
LOCATE 13, 51
PRINT " "
COLOR 4, 15
LOCATE 14, 53
PRINT "Mode"
DO
DO
COLOR 0, 15
i$ = INKEY$
LOCATE 4, 27
PRINT DATE$; " "; TIME$;
LOOP WHILE i$ = ""
LOCATE 13, 52
COLOR 2, 0
SELECT CASE i$
CASE "U", "u"
PRINT #1, CHR$(17);
FOR x = 1 TO 4
PRINT #1, CHR$(1);
NEXT x
PRINT " USB "
CASE "L", "l"
PRINT #1, CHR$(16);
FOR x = 1 TO 4
PRINT #1, CHR$(1);
NEXT x
PRINT " LSB "
CASE "A", "a"
PRINT #1, CHR$(21);
FOR x = 1 TO 4
PRINT #1, CHR$(1);
NEXT x
PRINT "AM - W"
CASE "F", "f"
PRINT #1, CHR$(22);
FOR x = 1 TO 4
PRINT #1, CHR$(1);
NEXT x
PRINT "FM - N"
CASE "N", "n"
PRINT #1, CHR$(20);
FOR x = 1 TO 4
PRINT #1, CHR$(1);
NEXT x
PRINT "AM - N"
CASE "W", "w"
PRINT #1, CHR$(23);
FOR x = 1 TO 4
PRINT #1, CHR$(1);
NEXT x
PRINT "FM - W"
CASE "Q", "q"
CLOSE #1
CLS
LOCATE 10, 25
PRINT " Created by R.A. Harris WB4HRH";
FOR count = 1 TO 3000
NEXT count
END
CASE "e", "E"
CALL infreq
END SELECT
LOOP
CLOSE #1
END SUB