TS-440s Controller BASIC Listing
15 November 1988
Alan Electron
Tandy Color Computer III program to control a Kenwood high frequency
amateur band transceiver. Needs TS-440S.BIN to be also on the disk.
1 CLEAR 200,&H6FFF :'make room for machine language
2 LOADM "TS-440S" :'machine language routines
3 DEF USR 1=&H7000 :'keyboard or RS-232 input
4 DEF USR 2=&H7003 :'RS-232 output routine
5 DEF USR 3=&H7006 :'initialise buffer pointers
6 A=USR3(0) :'initialise buffer pointers
10 HSCREEN 2 :'320x192 16 colours
20 HCOLOR 2,8 :'blue foreground
30 HCLS :'black out screen
40 HLINE (0,0)-(320,27),PSET,BF :'blue box
50 HCOLOR 4,8 :'white foreground
60 HPRINT(16,1),"Transceiver Control"
70 HPRINT(16,2),"Program for VK4VFJ"
80 HLINE (0,0)-(320,192),PSET,B :'whole perimeter
90 HLINE (0,27)-(320,27),PSET :'blue box outline
100 HPRINT (1,4),"Frequency"
110 HPRINT (20,4),"MHz Step 0.01"
120 HPRINT (35,4),"KHz"
130 HPRINT (1,8),"0 5 10 15 20 25 30"
140 HPRINT (0,12),"VFO A"
150 HPRINT (0,14),"VFO B"
160 HPRINT (0,16),"Memory"
170 HPRINT (16,12),"MHz"
180 HPRINT (16,14),"MHz"
190 HPRINT (16,16),"MHz"
200 HLINE (0,90)-(320,90),PSET :'below spectral display
210 HPRINT (15,9),"Megahertz"
220 HLINE (0,140)-(320,140),PSET:'above annunciators
230 HLINE(154,90)-(154,140),PSET:'between VFO and RIT
240 HPRINT (20,12),"RIT"
250 HPRINT (35,12),"KHz"
260 HPRINT (21,16),"-2 -1 0 +1 +2"
270 HPRINT (1,18),"Mode Memory ch Scan Split State"
280 HLINE (0,176)-(320,176),PSET:'below annunciators
290 HLINE (60,140)-(60,176),PSET:'between mode and memory
300 HLINE (140,140)-(140,176),PSET:'between memory and scan
310 HLINE (200,140)-(200,176),PSET:'between scan and memory
320 HLINE (266,140)-(266,176),PSET:'between split and state
330 HDRAW"BM8,8" :'start of TS-440S
340 GOSUB 1620 :'T
350 GOSUB 1600 :'S
360 GOSUB 1340 :'-
370 GOSUB 1440 :'4
380 GOSUB 1440 :'4
390 GOSUB 1360 :'0
400 GOSUB 1600 :'S
410 HLINE (8,60)-(296,60),PSET :'spectral display
420 HLINE (8,56)-(8,63),PSET
430 HLINE (56,58)-(56,62),PSET
440 HLINE (104,56)-(104,63),PSET
450 HLINE (152,58)-(152,62),PSET
460 HLINE (200,56)-(200,63),PSET
470 HLINE (248,58)-(248,62),PSET
480 HLINE (296,56)-(296,63),PSET
490 HLINE (176,124)-(304,124),PSET:'RIT analogue display
500 HLINE (176,120)-(176,127),PSET
510 HLINE (208,120)-(208,127),PSET
520 HLINE (240,120)-(240,127),PSET
530 HLINE (272,120)-(272,127),PSET
540 HLINE (304,120)-(304,127),PSET
600 A$="Test message ;"
610 A=VARPTR(A$)+2
620 A=256*PEEK(A)+PEEK(A+1)
630 A=USR2(A)
640 A=USR1(0)
650 IF A=29192 THEN 860
660 IF A=29163 THEN 690
670 HPRINT(1,23), "?"
680 GOTO 640
690 A$=""
700 B$=CHR$(PEEK(A))
710 A$=A$+B$
720 IF B$=";" THEN 760
730 IF ASC(B$)=13 THEN 760
740 A=A+1
750 GOTO 700
760 IF ASC(B$)=13 THEN A$=A$+";"
770 A=VARPTR(A$)+2
780 A=256*PEEK(A)+PEEK(A+1)
790 A=USR2(A)
800 HCOLOR 8,8
810 HPRINT(1,23),R$
820 HCOLOR 1,8
830 HPRINT(1,23),A$
840 R$=A$
850 GOTO 640
860 A$=""
870 B$=CHR$(PEEK(A))
880 A$=A$+B$
890 IF B$=";" THEN 920
900 A=A+1
910 GOTO 870
920 HCOLOR 8,8
930 HPRINT(1,23),R$
940 HCOLOR 4,8
950 HPRINT(1,23),A$
960 R$=A$
970 B$=MID$(A$,1,2)
980 IF B$="FA" THEN 1030
990 IF B$="FB" THEN 1110
1000 IF B$="IF" THEN 1190
1010 IF B$="MR" THEN 640
1020 GOTO 640
1030 IF MID$(A$,14,1)=";" THEN 1050
1040 GOTO 640
1050 B=3
1060 E=13
1070 X=7
1080 Y=12
1090 GOSUB 1290
1100 GOTO 640
1110 IF MID$(A$,14,1)=";" THEN 1130
1120 GOTO 640
1130 B=3
1140 E=13
1150 X=7
1160 Y=14
1170 GOSUB 1290
1180 GOTO 640
1190 IF MID$(A$,38,1)=";" THEN 1210
1200 GOTO 640
1210 B=3
1220 E=13
1230 X=11
1240 Y=4
1250 GOSUB 1290
1260 HLINE (232,96)-(271,103),PRESET,BF
1270 HPRINT (29,12),MID$(A$,19,2)+"."+MID$(A$,21,2)
1280 GOTO 640
1290 B$=MID$(A$,B+3,2)+"."+MID$(A$,B+5,5)
1300 IF LEFT$(B$,1)="0" THEN B$=" "+RIGHT$(B$,LEN(B$)-1)
1310 HLINE(X*8,Y*8)-(X*8+64,Y*8+8),PRESET,BF
1320 HPRINT (X,Y),B$
1330 RETURN
1340 HDRAW"BM+2,7;R10;BM+4,-7"
1350 RETURN
1360 HDRAW"BR10;L6;G2;D1;G1;D6;F1;D1;F2;R6;E2;U1;E1;U6;H1;U1;H2;BR6"
1370 RETURN
1380 HDRAW"BM+5,2;E2;D14;L2;R4;BM+7,-14"
1390 RETURN
1400 HDRAW"BM+1,3;E3;R6;F3;D2;E2;L1;G1;L1;G1;L1;G1;L1;G3;D1;R12;BM+3,-14"
1410 RETURN
1420 HDRAW"BM+1,3;E3;R6;F3;D2;G2;L4;BM+5,1;F1;D2;G3;L6;H3;BM+15,-11"
1430 RETURN
1440 HDRAW"BM+10,14;U14;G9;D1;R12;BM+3,-10"
1450 RETURN
1460 HDRAW"BM+1,11;F3;R6;E3;U3;L6;G2;L1;U7;R12;BR3"
1470 RETURN
1480 HDRAW"BM+13,3;H3;L6;G3;D8;F3;R6;E3;H3;L6;G2;BM+14,-7"
1490 RETURN
1500 HDRAW"BM+1,2;U2;R12;D1;G12;D1;BM+15,-14"
1510 RETURN
1520 HDRAW"BR4;G2;D3;F2;R7;F2;D3;G2;L7;H2;U3;E2;BR7;E2;U3;H2;L6;BR11"
1530 RETURN
1540 HDRAW"BM+1,11;F3;R6;E3;U8;H3;L6;G3;D3;F3;L6;E2;BM+4,-7"
1550 RETURN
1560 HDRAW"BM+8,7;L7;D7;U14;R12;BR3"
1570 RETURN
1580 HDRAW"BM+1,14;U14;F1;D1;F10;D1;F1;U14;BR3"
1590 RETURN
1600 HDRAW"BM+1,14;U2;F1;R1;F1;R6;E1;R1;E1;U3;H1;L1;H1;L6;H1;L1;H1;U3;E1;R1;E1;R6;F1;R1;F1;U2;BR3"
1610 RETURN
1620 HDRAW"BM+1,2;U2;R12;D2;BM-6,-2;D14;L1;R2;BM+8,-14"
1630 RETURN
Copyright © 2000 Alan Electron. All Rights Reserved.
Coco III
| TS-440s Controller
| Issue 2, 29 May 2021
|
ts440bas.html
| Draft
| Page 1 of 1
|