Program Code Download
Change the BASIC colours to classic green-on-black theme.
10 poke 53280,0:poke 53281,0:poke 646,5
termcol.prg
The classic code line to print a maze pattern.
10 print chr$(205.5+rnd(1));
20 goto 10
mazedraw.prg
Check which SID chip the machine uses.
10 fori=0to67:reada:poke49152+i,a:next
20 sys49152:a=peek(251)
30 b=a:sys49152:a=peek(251):ifa<>bthen30
42 data162,29,169,0,157,255,211,202,208,250
44 data120,173,17,208,41,239,141,17,208,169
46 data32,141,14,212,141,15,212,169,49,141
50 data18,212,162,0,134,251,160,0,173,27
60 data212,197,251,144,2,133,251,232,208,244
70 data136,208,241,169,48,141,18,212,173,17
80 data208,9,16,141,17,208,88,96
100 ifa<128thenprint"6581":end
110 print"8580"
checksid.prg
Print prime numbers.
0 printchr$(147):l=1000000:b=2:c=3
1 forn=ctol:ford=bto(n-1):ifn/d=int(n/d)then3
2 nextd:printn;
3 nextn
prime1.prg
Benchmark how long it takes to calculate all prime numbers up to 255.
0 dima(255):k=2:n=0:c=1:g=2:z=255:x=128:e=ti
1 forn=gtoz/k:a(n*k)=c:next
2 forn=k+ctoz:ifa(n)<>cthenk=n:n=z
4 next:ifk<xthen1
5 print(ti-e)/60"seconds":print"any key for results"
7 geta$:ifa$=""then7
10 fort=1to255:ifa(t)=0thenprintt
20 next
prime2.prg