home *** CD-ROM | disk | FTP | other *** search
/ 64'er 1988 March / 64er_Magazin_88-03_1988_Markt__Technik_de_Side_A.d64 / frequenzgen. (.txt) < prev    next >
Commodore BASIC  |  2022-10-26  |  5KB  |  210 lines

  1. 1000 ifpeek(2)=1then1090
  2. 1010 :
  3. 1020 rem "****************
  4. 1030 [143] "* frequenzgen. *
  5. 1040 rem "* marcus biber *
  6. 1050 [143] "****************
  7. 1060 :
  8. 1070 poke53280,0:poke53281,0:print"[147]"
  9. 1080 poke2,1:load"mobs.freq",8,1
  10. 1090 printchr$(142)chr$(8)
  11. 1100 poke55,0:poke56,128:clr
  12. 1110 poke56576,peek(56576)and252or1
  13. 1120 poke53272,peek(53272)and15or48
  14. 1130 poke648,140:sc=8*4096+3*1024:v=53248
  15. 1140 wf$(4)="dreieck":wf$(5)="saegezahn":wf$(6)="rechteck":wf$(7)="rauschen"
  16. 1150 gosub2680
  17. 1160 pokev+16,131
  18. 1170 fori=0to4:pokev+2*i+1,60:next
  19. 1180 pokev,48:pokev+2,0:pokev+4,224
  20. 1190 pokev+6,192:pokev+8,160
  21. 1200 pokev+10,55:pokev+11,212
  22. 1210 pokev+12,152:pokev+13,196
  23. 1220 pokev+14,41:pokev+15,196
  24. 1230 pokev+21,255
  25. 1240 pokev+28,31:pokev+29,32:pokev+44,1
  26. 1250 pokev+37,7:pokev+38,5
  27. 1260 si=54272:t=985248.4:c=2^24
  28. 1270 f1=0:f2=0:f3=0:f4=0:f0=0
  29. 1280 w1=0:w2=0:w3=0:w4=0:w5=0
  30. 1290 l=7:wf=4
  31. 1300 pokesi,0:pokesi+1,0
  32. 1310 pokesi+5,0:pokesi+6,240
  33. 1320 pokesi+2,0:pokesi+3,8
  34. 1330 pokesi+24,l
  35. 1340 gt=1:gosub2340
  36. 1350 goto 1920
  37. 1360 :
  38. 1370 rem "hauptschleife (tasten)
  39. 1380 :
  40. 1390 [161] t$
  41. 1400 [139]t$[178]"input"[167]f4[178]f4[170]1:[137]1650
  42. 1410 [139]t$[178]"dim"[167]f3[178]f3[170]1:[137]1640
  43. 1420 [139]t$[178]"read"[167]f2[178]f2[170]1:[137]1630
  44. 1430 [139]t$[178]"let"[167]f1[178]f1[170]1:[137]1620
  45. 1440 [139]t$[178]"goto"[167]w5[178]w5[170]1:[137]1730
  46. 1450 [139]t$[178]"run"[167]w4[178]w4[170]1:[137]1720
  47. 1460 [139]t$[178]"if"[167]w3[178]w3[170]1:[137]1710
  48. 1470 [139]t$[178]"restore"[167]w2[178]w2[170]1:[137]1700
  49. 1480 [139]t$[178]"+"[176]t$[178]"(NULL)"[167]l[178]l[170]1:[137]1760
  50. 1490 [139]t$[178]"-"[176]t$[178]"(NULL)"[167]l[178]l[171]1:[137]1760
  51. 1500 [139]t$[178]"\"[176]t$[178]"step"[167]wf[178]wf[170]1:[137]1800
  52. 1510 [139]t$[178]" "[176]t$[178]"close"[167]gt[178](1[171]gt):[141]2340:[137]1390
  53. 1520 [139]t$[178]""[167]f0[178]f0[170]1:[137]1660
  54. 1530 [139]t$[178]"on"[167]w1[178]w1[170]1:[137]1690
  55. 1540 [139]t$[178]""[176]t$[178]"load"[167]f0[178]0:f1[178]0:f2[178]0:f3[178]0:f4[178]0:[137]2460
  56. 1550 [139]t$[178]""[167][158]64738
  57. 1560 [139]t$[178]"^"[175]f[179]1920[167]f[178]2[172]f:[141]2250:[137]2470
  58. 1570 [139]t$[178]"*"[167]f[178]f[173]2:[141]2250:[137]2470
  59. 1580 [137]1390
  60. 1590 :
  61. 1600 [143] "auswertung
  62. 1610 :
  63. 1620 iff1>9thenf1=0
  64. 1630 iff2>9thenf2=0
  65. 1640 iff3>9thenf3=0
  66. 1650 iff4>3thenf4=0
  67. 1660 iff0>9thenf0=0
  68. 1670 goto2460
  69. 1680 :
  70. 1690 ifw1>9thenw1=0
  71. 1700 ifw2>9thenw2=0
  72. 1710 ifw3>9thenw3=0
  73. 1720 ifw4>9thenw4=0
  74. 1730 ifw5>6thenw5=0
  75. 1740 goto2520
  76. 1750 :
  77. 1760 ifl>15thenl=15
  78. 1770 ifl<0thenl=0
  79. 1780 gosub2580
  80. 1790 poke si+24,l:goto1390
  81. 1800 :
  82. 1810 ifwf>7thenwf=4
  83. 1820 gosub2340
  84. 1830 poke211,3:poke214,11:sys58640:print"[155]"wf$(4)
  85. 1840 poke211,3:poke214,13:sys58640:print"[155]"wf$(5)
  86. 1850 poke211,3:poke214,15:sys58640:print"[155]"wf$(6)
  87. 1860 poke211,3:poke214,17:sys58640:print"[155]"wf$(7)
  88. 1870 poke211,3:poke214,11+(2*(wf-4)):sys58640:print"[158]"wf$(wf)
  89. 1880 goto1390
  90. 1890 :
  91. 1900 rem "werte setzen
  92. 1910 :
  93. 1920 a[178][181](w[173]256):b[178]w[171](256[172]a)
  94. 1930 [151]si,b:[151]si[170]1,a
  95. 1940 [151]211,19:[151]214,11:[158]58640:[153]"   cmdcmdcmdcmd"b
  96. 1950 [151]211,31:[151]214,11:[158]58640:[153]"   cmdcmdcmdcmd"a
  97. 1960 [151]sc[170]1023,14:[151]v[170]46,5
  98. 1970 [151]sc[170]782,w5[170]48
  99. 1980 [151]sc[170]784,w4[170]48
  100. 1990 [151]sc[170]786,w3[170]48
  101. 2000 [151]sc[170]788,w2[170]48
  102. 2010 [151]sc[170]790,w1[170]48
  103. 2020 [151]sc[170]1016,f0
  104. 2030 [151]sc[170]1017,f1
  105. 2040 [151]sc[170]1018,f2
  106. 2050 [151]sc[170]1019,f3
  107. 2060 [151]sc[170]1020,f4
  108. 2070 [137]1390
  109. 2080 :
  110. 2090 [143] "ueberlauf
  111. 2100 :
  112. 2110 pokesc+1023,15:pokev+46,10
  113. 2120 goto1970
  114. 2130 :
  115. 2140 rem "wert >>> digits
  116. 2150 :
  117. 2160 w5[178][181](w[173]10000)   :r[178]w5[172]10000
  118. 2170 w4[178][181]((w[171]r)[173]1000):r[178]r[170]w4[172]1000
  119. 2180 w3[178][181]((w[171]r)[173]100) :r[178]r[170]w3[172]100
  120. 2190 w2[178][181]((w[171]r)[173]10)  :r[178]r[170]w2[172]10
  121. 2200 w1[178][181](w[171]r)
  122. 2210 [142]
  123. 2220 :
  124. 2230 [143] "frequenz >>> digits
  125. 2240 :
  126. 2250 f4=int(f/1000)   :r=f4*1000
  127. 2260 f3=int((f-r)/100):r=r+f3*100
  128. 2270 f2=int((f-r)/10) :r=r+f2*10
  129. 2280 f1=int(f-r)      :r=r+f1
  130. 2290 f0=(f-r)*10
  131. 2300 return
  132. 2310 :
  133. 2320 rem "gatebit + waveform
  134. 2330 :
  135. 2340 [151] si[170]4,2[174]wf[170]gt
  136. 2350 [151]211,16:[151]214,23:[158]58640
  137. 2360 [139]gt[167][153]"sysoutput";:[151]sc[170]1022,16:[151]v[170]45,7
  138. 2370 [139]gt[178]0[167][153]"list ---- ";:[151]sc[170]1022,17:[151]v[170]45,15
  139. 2380 [139]wf[178]4[167][151]sc[170]1021,11
  140. 2390 [139]wf[178]5[167][151]sc[170]1021,12
  141. 2400 [139]wf[178]6[167][151]sc[170]1021,10
  142. 2410 [139]wf[178]7[167][151]sc[170]1021,13
  143. 2420 [142]
  144. 2430 :
  145. 2440 [143] "frequenz >>> wert
  146. 2450 :
  147. 2460 f=(f1)+(f2*10)+(f3*100)+(f4*1000)+(f0/10)                 
  148. 2470 w=int((f*c)/t+.5):ifw>65535thengosub2110
  149. 2480 gosub2160:goto1920
  150. 2490 :
  151. 2500 rem "wert >>> frequenz
  152. 2510 :
  153. 2520 w[178](w1)[170](w2[172]10)[170](w3[172]100)[170](w4[172]1000)[170](w5[172]10000):[139]w[177]65535[167][141]2110
  154. 2530 f[178][181]((w[172]t[173]c)[172]10[170].5)[173]10
  155. 2540 [141]2250:[137]1920
  156. 2550 :
  157. 2560 [143] "balken
  158. 2570 :
  159. 2580 fori=1tol
  160. 2590 pokesc+943+i,160
  161. 2600 next
  162. 2610 fori=l+1to15
  163. 2620 pokesc+943+i,32
  164. 2630 next
  165. 2640 return
  166. 2650 :
  167. 2660 rem "maske ausgeben
  168. 2670 :
  169. 2680 [153]"load"
  170. 2690 [153]" print#(NULL)tantantantantantantantan";
  171. 2700 [153]"tantantantantanright$poke                   ";
  172. 2710 [153]"      print#(NULL)listfrequenz (hz)print#(NULL)poke    ";
  173. 2720 [153]"                     print#mid$tantantan";
  174. 2730 [153]"tantantantantantantantantantan(NULL)poke              ";
  175. 2740 [153]"   print(NULL)      print#andandandandandandandandandandandandandandand";
  176. 2750 [153]"andandandandandandandandandandandandandandandandandandandandandandandandand";
  177. 2760 [153]"fn            then           ";
  178. 2770 [153]"               fn(NULL)tantantantantantantantan";
  179. 2780 [153]"tantanright$thenpoke print#(NULL)tantantantantantantantantanright$poke print#(NULL)tantantantantantantan";
  180. 2790 [153]"tantanright$poke  print#fn(NULL)listwellenformprint#(NULL)thenpoke print#(NULL)listlow-";
  181. 2800 [153]"byte print#(NULL)+(NULL)listhigh-byteprint#(NULL)list poke print#fnmid$tantantan";
  182. 2810 [153]"tantantantantantantan(NULL)thenpoke print#mid$tantantantantantantantantan(NULL)poke print#mid$tantan";
  183. 2820 [153]"tantantantantantantan(NULL)poke  print#fnpoke            print#thenpoke ";
  184. 2830 [153]"                         ";
  185. 2840 [153]"print#fnpoke list print#        poke  print#thenpoke          pokewait ";
  186. 2850 [153]"           pokewait    print#fnpoke  sysdreieck";
  187. 2860 [153]" poke  print#thenpoke    wait      pokewait  cont+poke   wait     ";
  188. 2870 [153]" pokewait    print#fnpoke            print#thenpoke      ";
  189. 2880 [153]"    pokewait            pokewait    print#fnpoke list sae";
  190. 2890 [153]"gezahnpoke print#thenpoke                ";
  191. 2900 [153]"          print#fnpoke            print#thenpoke ";
  192. 2910 [153]"print#(NULL)tantantantantantantantantantantantantantantantantantantantantantanright$poke ";
  193. 2920 [153]"print#fnpoke  listrechteck poke print#thenpoke print#(NULL)listresultat ";
  194. 2930 [153]"(16-bit-wert)print#(NULL)list print#fnpoke list        ";
  195. 2940 [153]"  poke print#thenpoke print#mid$tantantantantantantantantantantantantantantantantantantan";
  196. 2950 [153]"tantantan(NULL)poke print#fnpoke list(rauschen)poke print#thenpoke      ";
  197. 2960 [153]"                    print#fnpoke    ";
  198. 2970 [153]"        print#thenpoke                ";
  199. 2980 [153]"   pokewait       print#fnpoke list          poke print#thenpoke ";
  200. 2990 [153]"      wait            pokewait      list ";
  201. 3000 [153]"print#fnpoke          pokewait  print#thenpoke           ";
  202. 3010 [153]"        pokewait       print#fnpoke         ";
  203. 3020 [153]" pokewait  print#thenpoke                     ";
  204. 3030 [153]"     print#fnpoke          pokewait  print#thenpoke print#(NULL)tantantantan";
  205. 3040 [153]"tantanright$poke                 print#fnpoke  stop  ";
  206. 3050 [153]"       pokewait print#thenpoke print#(NULL)list      print#(NULL)poke        ";
  207. 3060 [153]"wait        cont print#(NULL)andandandandandandandandandandandandsqrpoke ";
  208. 3070 [153]"print#mid$tantantantantantan(NULL)";
  209. 3080 [142]
  210.