home *** CD-ROM | disk | FTP | other *** search
/ Loadstar 16 / 016.d81 / radio (.txt) < prev    next >
Commodore BASIC  |  2022-08-26  |  15KB  |  520 lines

  1. 10 poke53281,1:poke53280,2:print"[147]"chr$(142)
  2. 100 clr:tune=1000:khz=93+128:ss=1239:a=1000
  3. 190 print"                                        [144][146]";
  4. 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]";
  5. 205 print"[161][151]    540 [221]   900 [221]   1300[221]             [146][155][161]";
  6. 210 print"[161][151]     [212]  700 [221]   1100[221]   1500          [146][155][161]";
  7. 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]";
  8. 230 print"[161][151] am [144]                       [151] [146] 1000 khz[151][167][146][155][161]";
  9. 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]";
  10. 250 print"[161][151]      600 [221]   1000[221]   1400[221]           [146][155][161]";
  11. 255 print"[161][151]      [221]   800 [221]   1200[221]   1600        [146][155][161][146]";
  12. 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]";
  13. 261 poke1239,93+128
  14. 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]"
  15. 265 dima$(500),b$(500),c$(500),d$(500),m$(500),n$(500),o$(500),p$(500)
  16. 266 c=1
  17. 267 poke54296,0:open1,8,0,"amstat,s,w"
  18. 268 input#1,a$(c)
  19. 269 ifa$(c)="end"then280
  20. 270 input#1,b$(c)
  21. 272 input#1,c$(c)
  22. 273 input#1,d$(c)
  23. 275 c=c+1:goto268
  24. 280 close1
  25. 290 gosub1010:goto1000
  26. 300 :
  27. 301 rem                                         -------------------------------
  28. 302 rem        tune the radio l/r               -------------------------------
  29. 400 :
  30. 410 rem ---tune left---
  31. 420 x=(tune-a)/10:nn=0
  32. 431 ifkhz=93+128thenkhz=84+128:goto440
  33. 432 ifkhz=84+128thenkhz=101+128:goto440
  34. 433 ifkhz=101+128thenkhz=103+128:pokess,160:ss=ss-1:goto440
  35. 434 ifkhz=103+128thenkhz=89+128:goto440
  36. 435 ifkhz=89+128thenkhz=93+128
  37. 440 pokess,khz:nn=nn+1:tune=tune-10
  38. 445 print"";tune;"[157] [144]"
  39. 450 ifnn<xthen431
  40. 455 print""
  41. 460 return
  42. 500 :
  43. 510 rem ---tune right---
  44. 520 x=(a-tune)/10:nn=0
  45. 531 ifkhz=93+128thenkhz=89+128:goto540
  46. 532 ifkhz=89+128thenkhz=103+128:goto540
  47. 533 ifkhz=103+128thenkhz=101+128:pokess,160:ss=ss+1:goto540
  48. 534 ifkhz=101+128thenkhz=84+128:goto540
  49. 535 ifkhz=84+128thenkhz=93+128
  50. 540 pokess,khz:nn=nn+1:tune=tune+10
  51. 545 print"";tune;"[157] [144]"
  52. 550 ifnn<xthen531
  53. 555 print""
  54. 560 return
  55. 1000 rem                                         -----------------------------
  56. 1001 rem           menu menu menu                -----------------------------
  57. 1005 goto1100
  58. 1010 print""
  59. 1011 forl=1984to2023:pokel+54272,2:pokel,160:next
  60. 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]";
  61. 1021 print"[165]f1   enter a station frequency        [167]";
  62. 1022 print"[165]f3   enter a city                     [167]";
  63. 1023 print"[165]f5   enter a station's call letters   [167]";
  64. 1024 print"[165]f7   enter a classification           [167]";
  65. 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]"
  66. 1030 return
  67. 1100 tune=a
  68. 1110 getjunk$:ifjunk$<>""then1110
  69. 1200 getg$:ifg$=""then1200
  70. 1210 ifg$="[133]"thenprint"enter a station frequency[144]"
  71. 1211 ifg$="[133]"thengoto2000
  72. 1212 ifg$="[134]"thenprint"enter a city[144]"
  73. 1213 ifg$="[134]"thengoto3000
  74. 1214 zx$=""
  75. 1215 ifg$="[135]"thenprintzx$+"enter a station's call letters[144]"
  76. 1216 ifg$="[135]"then4000
  77. 1217 ifg$="[136]"thenprint"enter a classification[144]"
  78. 1218 ifg$="[136]"thengoto11000
  79. 1219 ifg$="a"then6000
  80. 1220 goto1200
  81. 2000 rem                                        -------------------------------
  82. 2001 rem      input frequency                   -------------------------------
  83. 2010 print"enter station frequency: ";:h$=""
  84. 2015 getjunk$:ifjunk$<>""then2015
  85. 2020 getg$:ifg$=""then2020
  86. 2021 ifasc(g$)=49then2025
  87. 2022 ifasc(g$)<53then2020
  88. 2023 ifasc(g$)>57then2020
  89. 2025 printg$;:h$=h$+g$
  90. 2026 ifasc(g$)>49then2031
  91. 2027 getg$:ifg$=""then2027
  92. 2028 ifasc(g$)<48then2027
  93. 2029 ifasc(g$)>54then2027
  94. 2030 printg$;:h$=h$+g$:ifg$="6"then2040
  95. 2031 getg$:ifg$=""then2031
  96. 2032 ifasc(g$)<48then2031
  97. 2033 ifasc(g$)>57then2031
  98. 2034 printg$;:h$=h$+g$
  99. 2035 goto2043
  100. 2040 getg$:ifg$=""then2040
  101. 2041 ifasc(g$)<>48then2040
  102. 2042 printg$;:h$=h$+g$
  103. 2043 getg$:ifg$=""then2043
  104. 2044 ifasc(g$)<>48then2043
  105. 2045 printg$:h$=h$+g$
  106. 2050 a=val(h$)
  107. 2060 :
  108. 2300 gosub 10000
  109. 2310 ifa<540then2312
  110. 2311 ifa<=1600then2319
  111. 2312 print"frequencies lie between 540 and 1600.":forxl=1to3000:next
  112. 2313 print"":forl=1to6:print"                                     "
  113. 2314 next:goto2010
  114. 2315 ifa=tunethen2500
  115. 2319 x=0
  116. 2320 forl=500to1600step10
  117. 2330 ifa=lthenx=1
  118. 2335 next
  119. 2340 ifx=0then2010
  120. 2400 ifa>tunethengosub500:goto2420
  121. 2410 iftune>athengosub400
  122. 2420 :
  123. 2500 rem --- print out stations -------
  124. 2510 b=1:goto2581
  125. 2520 v=1:print""
  126. 2530 ifa$(b)=h$thenprinttab(1)a$(b)tab(6)b$(b)tab(23)c$(b)tab(28)d$(b):v=v+1
  127. 2540 ifa$(b)="end"then2600
  128. 2550 b=b+1
  129. 2560 ifv<>4then2530
  130. 2570 print"       press return to continue"
  131. 2571 getjunk$:ifjunk$<>""then2571
  132. 2580 getg$:ifg$<>chr$(13)then2580
  133. 2581 print"":forl=1to6:print"                                      "
  134. 2585 next:goto2520
  135. 2600 print"       press return to continue"
  136. 2601 getjunk$:ifjunk$<>""then2601
  137. 2610 getg$:ifg$<>chr$(13)then2610
  138. 2621 print"":forl=1to6:print"                                      "
  139. 2625 next
  140. 2900 print"[144]enter a station frequency"
  141. 2999 goto1000
  142. 3000 rem                                        -------------------------------
  143. 3001 rem      input city                        -------------------------------
  144. 3005 x=0
  145. 3010 print"enter city: ";:h$=""
  146. 3011 getjunk$:ifjunk$<>""then3011
  147. 3020 getg$:ifg$=""then3020
  148. 3021 ifg$=" "thengoto3050
  149. 3022 ifasc(g$)<>20 thengoto3030
  150. 3023 iflen(h$)>0thenprintchr$(20);
  151. 3024 iflen(h$)>0thenh$=left$(h$,(len(h$)-1))
  152. 3025 goto3020
  153. 3030 ifg$=chr$(13)then3100
  154. 3040 ifasc(g$)<65orasc(g$)>90then3020
  155. 3050 printg$;:h$=h$+g$
  156. 3060 iflen(h$)<16then3070
  157. 3062 gosub10000
  158. 3069 goto3100
  159. 3070 goto3020
  160. 3100 iflen(h$)<16thengosub10000
  161. 3105 ifh$=""thengoto 3990
  162. 3110 b=1:goto3900
  163. 3120 v=1:ifv=1then  print""
  164. 3121 ifv=2then  print""
  165. 3122 ifv=3then  print""
  166. 3123 ifv=4then  print""
  167. 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
  168. 3131 ifb$(b)<>h$then3140
  169. 3132 a=val(a$(b))
  170. 3133 ifa>tunethengosub500:goto3140
  171. 3134 iftune>athengosub400
  172. 3140 ifa$(b)="end"then3500
  173. 3150 b=b+1
  174. 3160 ifv<>4then3121
  175. 3170 print"       press return to continue"
  176. 3171 getjunk$:ifjunk$<>""then3171
  177. 3180 getg$:ifg$<>chr$(13)then3180
  178. 3185 print"":forl=1to5
  179. 3186 print"                                       "
  180. 3190 next:goto3120
  181. 3500 ifx=0thenprint"  sorry . . . not listed "
  182. 3510 print"       press return to continue"
  183. 3511 getjunk$:ifjunk$<>""then3511
  184. 3515 getg$:ifg$<>chr$(13)then3515
  185. 3520 goto3990
  186. 3900 print"":forl=1to5
  187. 3901 print"                                       "
  188. 3902 next:goto3120
  189. 3990 poke54296,0:print"":forl=1to5
  190. 3991 print"                                       "
  191. 3992 next
  192. 3995 print