home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Loadstar 16
/
016.d81
/
radio
(
.txt
)
< prev
next >
Wrap
Commodore BASIC
|
2022-08-26
|
15KB
|
520 lines
10 poke53281,1:poke53280,2:print"[147]"chr$(142)
100 clr:tune=1000:khz=93+128:ss=1239:a=1000
190 print" [144][146]";
200 print"[155][172][162][162][162][162][162][162][162][162][162][162][162][162][162][162][162][162][162][162][162][162][162][162][162][162][162][162][162][162][162][162][162][162][162][162][162][162][162][162][187]";
205 print"[161][151] 540 [221] 900 [221] 1300[221] [146][155][161]";
210 print"[161][151] [212] 700 [221] 1100[221] 1500 [146][155][161]";
220 print"[161][151] [144][221][221][221][221][221][221][221][221][221][221][221][221][221][221][221][221][221][221][221][221][221][221][221][151] [164][164][164][164][164][164][164][164] [146][155][161]";
230 print"[161][151] am [144] [151] [146] 1000 khz[151][167][146][155][161]";
240 print"[161][151] [144][221][221][221][221][221][221][221][221][221][221][221][221][221][221][221][221][221][221][221][221][221][221][221][151] [163][163][163][163][163][163][163][163] [146][155][161]";
250 print"[161][151] 600 [221] 1000[221] 1400[221] [146][155][161]";
255 print"[161][151] [221] 800 [221] 1200[221] 1600 [146][155][161][146]";
260 print"[188][162][162][162][162][162][162][162][162][162][162][162][162][162][162][162][162][162][162][162][162][162][162][162][162][162][162][162][162][162][162][162][162][162][162][162][162][162][162][146][190][144]";
261 poke1239,93+128
262 print"[197][197][197][197][197][197][197][197][197][197][197][197][197][197][197][197][197][197][197][197][197][197][197][197][197][197][197][197][197][197][197][197][197][197][197][197][197][197][197][197][144]"
265 dima$(500),b$(500),c$(500),d$(500),m$(500),n$(500),o$(500),p$(500)
266 c=1
267 poke54296,0:open1,8,0,"amstat,s,w"
268 input#1,a$(c)
269 ifa$(c)="end"then280
270 input#1,b$(c)
272 input#1,c$(c)
273 input#1,d$(c)
275 c=c+1:goto268
280 close1
290 gosub1010:goto1000
300 :
301 rem -------------------------------
302 rem tune the radio l/r -------------------------------
400 :
410 rem ---tune left---
420 x=(tune-a)/10:nn=0
431 ifkhz=93+128thenkhz=84+128:goto440
432 ifkhz=84+128thenkhz=101+128:goto440
433 ifkhz=101+128thenkhz=103+128:pokess,160:ss=ss-1:goto440
434 ifkhz=103+128thenkhz=89+128:goto440
435 ifkhz=89+128thenkhz=93+128
440 pokess,khz:nn=nn+1:tune=tune-10
445 print"";tune;"[157] [144]"
450 ifnn<xthen431
455 print""
460 return
500 :
510 rem ---tune right---
520 x=(a-tune)/10:nn=0
531 ifkhz=93+128thenkhz=89+128:goto540
532 ifkhz=89+128thenkhz=103+128:goto540
533 ifkhz=103+128thenkhz=101+128:pokess,160:ss=ss+1:goto540
534 ifkhz=101+128thenkhz=84+128:goto540
535 ifkhz=84+128thenkhz=93+128
540 pokess,khz:nn=nn+1:tune=tune+10
545 print"";tune;"[157] [144]"
550 ifnn<xthen531
555 print""
560 return
1000 rem -----------------------------
1001 rem menu menu menu -----------------------------
1005 goto1100
1010 print""
1011 forl=1984to2023:pokel+54272,2:pokel,160:next
1020 print"[210][210][210][210][210][210][210][210][210][210][210][210][210][210][210][210][210][210][210][210][210][210][210][210][210][210][210][210][210][210][210][210][210][210][210][210][210][210][210][210][144]";
1021 print"[165]f1 enter a station frequency [167]";
1022 print"[165]f3 enter a city [167]";
1023 print"[165]f5 enter a station's call letters [167]";
1024 print"[165]f7 enter a classification [167]";
1026 print"[163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][144]"
1030 return
1100 tune=a
1110 getjunk$:ifjunk$<>""then1110
1200 getg$:ifg$=""then1200
1210 ifg$="[133]"thenprint"enter a station frequency[144]"
1211 ifg$="[133]"thengoto2000
1212 ifg$="[134]"thenprint"enter a city[144]"
1213 ifg$="[134]"thengoto3000
1214 zx$=""
1215 ifg$="[135]"thenprintzx$+"enter a station's call letters[144]"
1216 ifg$="[135]"then4000
1217 ifg$="[136]"thenprint"enter a classification[144]"
1218 ifg$="[136]"thengoto11000
1219 ifg$="a"then6000
1220 goto1200
2000 rem -------------------------------
2001 rem input frequency -------------------------------
2010 print"enter station frequency: ";:h$=""
2015 getjunk$:ifjunk$<>""then2015
2020 getg$:ifg$=""then2020
2021 ifasc(g$)=49then2025
2022 ifasc(g$)<53then2020
2023 ifasc(g$)>57then2020
2025 printg$;:h$=h$+g$
2026 ifasc(g$)>49then2031
2027 getg$:ifg$=""then2027
2028 ifasc(g$)<48then2027
2029 ifasc(g$)>54then2027
2030 printg$;:h$=h$+g$:ifg$="6"then2040
2031 getg$:ifg$=""then2031
2032 ifasc(g$)<48then2031
2033 ifasc(g$)>57then2031
2034 printg$;:h$=h$+g$
2035 goto2043
2040 getg$:ifg$=""then2040
2041 ifasc(g$)<>48then2040
2042 printg$;:h$=h$+g$
2043 getg$:ifg$=""then2043
2044 ifasc(g$)<>48then2043
2045 printg$:h$=h$+g$
2050 a=val(h$)
2060 :
2300 gosub 10000
2310 ifa<540then2312
2311 ifa<=1600then2319
2312 print"frequencies lie between 540 and 1600.":forxl=1to3000:next
2313 print"":forl=1to6:print" "
2314 next:goto2010
2315 ifa=tunethen2500
2319 x=0
2320 forl=500to1600step10
2330 ifa=lthenx=1
2335 next
2340 ifx=0then2010
2400 ifa>tunethengosub500:goto2420
2410 iftune>athengosub400
2420 :
2500 rem --- print out stations -------
2510 b=1:goto2581
2520 v=1:print""
2530 ifa$(b)=h$thenprinttab(1)a$(b)tab(6)b$(b)tab(23)c$(b)tab(28)d$(b):v=v+1
2540 ifa$(b)="end"then2600
2550 b=b+1
2560 ifv<>4then2530
2570 print" press return to continue"
2571 getjunk$:ifjunk$<>""then2571
2580 getg$:ifg$<>chr$(13)then2580
2581 print"":forl=1to6:print" "
2585 next:goto2520
2600 print" press return to continue"
2601 getjunk$:ifjunk$<>""then2601
2610 getg$:ifg$<>chr$(13)then2610
2621 print"":forl=1to6:print" "
2625 next
2900 print"[144]enter a station frequency"
2999 goto1000
3000 rem -------------------------------
3001 rem input city -------------------------------
3005 x=0
3010 print"enter city: ";:h$=""
3011 getjunk$:ifjunk$<>""then3011
3020 getg$:ifg$=""then3020
3021 ifg$=" "thengoto3050
3022 ifasc(g$)<>20 thengoto3030
3023 iflen(h$)>0thenprintchr$(20);
3024 iflen(h$)>0thenh$=left$(h$,(len(h$)-1))
3025 goto3020
3030 ifg$=chr$(13)then3100
3040 ifasc(g$)<65orasc(g$)>90then3020
3050 printg$;:h$=h$+g$
3060 iflen(h$)<16then3070
3062 gosub10000
3069 goto3100
3070 goto3020
3100 iflen(h$)<16thengosub10000
3105 ifh$=""thengoto 3990
3110 b=1:goto3900
3120 v=1:ifv=1then print""
3121 ifv=2then print""
3122 ifv=3then print""
3123 ifv=4then print""
3130 ifb$(b)=h$thenprinttab(1)a$(b)tab(6)b$(b)tab(23)c$(b)tab(28)d$(b):v=v+1:x=1
3131 ifb$(b)<>h$then3140
3132 a=val(a$(b))
3133 ifa>tunethengosub500:goto3140
3134 iftune>athengosub400
3140 ifa$(b)="end"then3500
3150 b=b+1
3160 ifv<>4then3121
3170 print" press return to continue"
3171 getjunk$:ifjunk$<>""then3171
3180 getg$:ifg$<>chr$(13)then3180
3185 print"":forl=1to5
3186 print" "
3190 next:goto3120
3500 ifx=0thenprint" sorry . . . not listed "
3510 print" press return to continue"
3511 getjunk$:ifjunk$<>""then3511
3515 getg$:ifg$<>chr$(13)then3515
3520 goto3990
3900 print"":forl=1to5
3901 print" "
3902 next:goto3120
3990 poke54296,0:print"":forl=1to5
3991 print" "
3992 next
3995 print