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 >
Wrap
Commodore BASIC
|
2022-10-26
|
5KB
|
210 lines
1000 ifpeek(2)=1then1090
1010 :
1020 rem "****************
1030 [143] "* frequenzgen. *
1040 rem "* marcus biber *
1050 [143] "****************
1060 :
1070 poke53280,0:poke53281,0:print"[147]"
1080 poke2,1:load"mobs.freq",8,1
1090 printchr$(142)chr$(8)
1100 poke55,0:poke56,128:clr
1110 poke56576,peek(56576)and252or1
1120 poke53272,peek(53272)and15or48
1130 poke648,140:sc=8*4096+3*1024:v=53248
1140 wf$(4)="dreieck":wf$(5)="saegezahn":wf$(6)="rechteck":wf$(7)="rauschen"
1150 gosub2680
1160 pokev+16,131
1170 fori=0to4:pokev+2*i+1,60:next
1180 pokev,48:pokev+2,0:pokev+4,224
1190 pokev+6,192:pokev+8,160
1200 pokev+10,55:pokev+11,212
1210 pokev+12,152:pokev+13,196
1220 pokev+14,41:pokev+15,196
1230 pokev+21,255
1240 pokev+28,31:pokev+29,32:pokev+44,1
1250 pokev+37,7:pokev+38,5
1260 si=54272:t=985248.4:c=2^24
1270 f1=0:f2=0:f3=0:f4=0:f0=0
1280 w1=0:w2=0:w3=0:w4=0:w5=0
1290 l=7:wf=4
1300 pokesi,0:pokesi+1,0
1310 pokesi+5,0:pokesi+6,240
1320 pokesi+2,0:pokesi+3,8
1330 pokesi+24,l
1340 gt=1:gosub2340
1350 goto 1920
1360 :
1370 rem "hauptschleife (tasten)
1380 :
1390 [161] t$
1400 [139]t$[178]"input"[167]f4[178]f4[170]1:[137]1650
1410 [139]t$[178]"dim"[167]f3[178]f3[170]1:[137]1640
1420 [139]t$[178]"read"[167]f2[178]f2[170]1:[137]1630
1430 [139]t$[178]"let"[167]f1[178]f1[170]1:[137]1620
1440 [139]t$[178]"goto"[167]w5[178]w5[170]1:[137]1730
1450 [139]t$[178]"run"[167]w4[178]w4[170]1:[137]1720
1460 [139]t$[178]"if"[167]w3[178]w3[170]1:[137]1710
1470 [139]t$[178]"restore"[167]w2[178]w2[170]1:[137]1700
1480 [139]t$[178]"+"[176]t$[178]"(NULL)"[167]l[178]l[170]1:[137]1760
1490 [139]t$[178]"-"[176]t$[178]"(NULL)"[167]l[178]l[171]1:[137]1760
1500 [139]t$[178]"\"[176]t$[178]"step"[167]wf[178]wf[170]1:[137]1800
1510 [139]t$[178]" "[176]t$[178]"close"[167]gt[178](1[171]gt):[141]2340:[137]1390
1520 [139]t$[178]""[167]f0[178]f0[170]1:[137]1660
1530 [139]t$[178]"on"[167]w1[178]w1[170]1:[137]1690
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
1550 [139]t$[178]""[167][158]64738
1560 [139]t$[178]"^"[175]f[179]1920[167]f[178]2[172]f:[141]2250:[137]2470
1570 [139]t$[178]"*"[167]f[178]f[173]2:[141]2250:[137]2470
1580 [137]1390
1590 :
1600 [143] "auswertung
1610 :
1620 iff1>9thenf1=0
1630 iff2>9thenf2=0
1640 iff3>9thenf3=0
1650 iff4>3thenf4=0
1660 iff0>9thenf0=0
1670 goto2460
1680 :
1690 ifw1>9thenw1=0
1700 ifw2>9thenw2=0
1710 ifw3>9thenw3=0
1720 ifw4>9thenw4=0
1730 ifw5>6thenw5=0
1740 goto2520
1750 :
1760 ifl>15thenl=15
1770 ifl<0thenl=0
1780 gosub2580
1790 poke si+24,l:goto1390
1800 :
1810 ifwf>7thenwf=4
1820 gosub2340
1830 poke211,3:poke214,11:sys58640:print"[155]"wf$(4)
1840 poke211,3:poke214,13:sys58640:print"[155]"wf$(5)
1850 poke211,3:poke214,15:sys58640:print"[155]"wf$(6)
1860 poke211,3:poke214,17:sys58640:print"[155]"wf$(7)
1870 poke211,3:poke214,11+(2*(wf-4)):sys58640:print"[158]"wf$(wf)
1880 goto1390
1890 :
1900 rem "werte setzen
1910 :
1920 a[178][181](w[173]256):b[178]w[171](256[172]a)
1930 [151]si,b:[151]si[170]1,a
1940 [151]211,19:[151]214,11:[158]58640:[153]" cmdcmdcmdcmd"b
1950 [151]211,31:[151]214,11:[158]58640:[153]" cmdcmdcmdcmd"a
1960 [151]sc[170]1023,14:[151]v[170]46,5
1970 [151]sc[170]782,w5[170]48
1980 [151]sc[170]784,w4[170]48
1990 [151]sc[170]786,w3[170]48
2000 [151]sc[170]788,w2[170]48
2010 [151]sc[170]790,w1[170]48
2020 [151]sc[170]1016,f0
2030 [151]sc[170]1017,f1
2040 [151]sc[170]1018,f2
2050 [151]sc[170]1019,f3
2060 [151]sc[170]1020,f4
2070 [137]1390
2080 :
2090 [143] "ueberlauf
2100 :
2110 pokesc+1023,15:pokev+46,10
2120 goto1970
2130 :
2140 rem "wert >>> digits
2150 :
2160 w5[178][181](w[173]10000) :r[178]w5[172]10000
2170 w4[178][181]((w[171]r)[173]1000):r[178]r[170]w4[172]1000
2180 w3[178][181]((w[171]r)[173]100) :r[178]r[170]w3[172]100
2190 w2[178][181]((w[171]r)[173]10) :r[178]r[170]w2[172]10
2200 w1[178][181](w[171]r)
2210 [142]
2220 :
2230 [143] "frequenz >>> digits
2240 :
2250 f4=int(f/1000) :r=f4*1000
2260 f3=int((f-r)/100):r=r+f3*100
2270 f2=int((f-r)/10) :r=r+f2*10
2280 f1=int(f-r) :r=r+f1
2290 f0=(f-r)*10
2300 return
2310 :
2320 rem "gatebit + waveform
2330 :
2340 [151] si[170]4,2[174]wf[170]gt
2350 [151]211,16:[151]214,23:[158]58640
2360 [139]gt[167][153]"sysoutput";:[151]sc[170]1022,16:[151]v[170]45,7
2370 [139]gt[178]0[167][153]"list ---- ";:[151]sc[170]1022,17:[151]v[170]45,15
2380 [139]wf[178]4[167][151]sc[170]1021,11
2390 [139]wf[178]5[167][151]sc[170]1021,12
2400 [139]wf[178]6[167][151]sc[170]1021,10
2410 [139]wf[178]7[167][151]sc[170]1021,13
2420 [142]
2430 :
2440 [143] "frequenz >>> wert
2450 :
2460 f=(f1)+(f2*10)+(f3*100)+(f4*1000)+(f0/10)
2470 w=int((f*c)/t+.5):ifw>65535thengosub2110
2480 gosub2160:goto1920
2490 :
2500 rem "wert >>> frequenz
2510 :
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
2530 f[178][181]((w[172]t[173]c)[172]10[170].5)[173]10
2540 [141]2250:[137]1920
2550 :
2560 [143] "balken
2570 :
2580 fori=1tol
2590 pokesc+943+i,160
2600 next
2610 fori=l+1to15
2620 pokesc+943+i,32
2630 next
2640 return
2650 :
2660 rem "maske ausgeben
2670 :
2680 [153]"load"
2690 [153]" print#(NULL)tantantantantantantantan";
2700 [153]"tantantantantanright$poke ";
2710 [153]" print#(NULL)listfrequenz (hz)print#(NULL)poke ";
2720 [153]" print#mid$tantantan";
2730 [153]"tantantantantantantantantantan(NULL)poke ";
2740 [153]" print(NULL) print#andandandandandandandandandandandandandandand";
2750 [153]"andandandandandandandandandandandandandandandandandandandandandandandandand";
2760 [153]"fn then ";
2770 [153]" fn(NULL)tantantantantantantantan";
2780 [153]"tantanright$thenpoke print#(NULL)tantantantantantantantantanright$poke print#(NULL)tantantantantantantan";
2790 [153]"tantanright$poke print#fn(NULL)listwellenformprint#(NULL)thenpoke print#(NULL)listlow-";
2800 [153]"byte print#(NULL)+(NULL)listhigh-byteprint#(NULL)list poke print#fnmid$tantantan";
2810 [153]"tantantantantantantan(NULL)thenpoke print#mid$tantantantantantantantantan(NULL)poke print#mid$tantan";
2820 [153]"tantantantantantantan(NULL)poke print#fnpoke print#thenpoke ";
2830 [153]" ";
2840 [153]"print#fnpoke list print# poke print#thenpoke pokewait ";
2850 [153]" pokewait print#fnpoke sysdreieck";
2860 [153]" poke print#thenpoke wait pokewait cont+poke wait ";
2870 [153]" pokewait print#fnpoke print#thenpoke ";
2880 [153]" pokewait pokewait print#fnpoke list sae";
2890 [153]"gezahnpoke print#thenpoke ";
2900 [153]" print#fnpoke print#thenpoke ";
2910 [153]"print#(NULL)tantantantantantantantantantantantantantantantantantantantantantanright$poke ";
2920 [153]"print#fnpoke listrechteck poke print#thenpoke print#(NULL)listresultat ";
2930 [153]"(16-bit-wert)print#(NULL)list print#fnpoke list ";
2940 [153]" poke print#thenpoke print#mid$tantantantantantantantantantantantantantantantantantantan";
2950 [153]"tantantan(NULL)poke print#fnpoke list(rauschen)poke print#thenpoke ";
2960 [153]" print#fnpoke ";
2970 [153]" print#thenpoke ";
2980 [153]" pokewait print#fnpoke list poke print#thenpoke ";
2990 [153]" wait pokewait list ";
3000 [153]"print#fnpoke pokewait print#thenpoke ";
3010 [153]" pokewait print#fnpoke ";
3020 [153]" pokewait print#thenpoke ";
3030 [153]" print#fnpoke pokewait print#thenpoke print#(NULL)tantantantan";
3040 [153]"tantanright$poke print#fnpoke stop ";
3050 [153]" pokewait print#thenpoke print#(NULL)list print#(NULL)poke ";
3060 [153]"wait cont print#(NULL)andandandandandandandandandandandandsqrpoke ";
3070 [153]"print#mid$tantantantantantan(NULL)";
3080 [142]