Sample 10 PRINT derivatives

C64 Manual version:
10 print chr$(205.5+rnd(1)); : goto10

Random screen location version:
10 poke 1024+rnd(1)*1000, 205.5+rnd(1)
20 goto 10

Random color version:
10 poke 646,rnd(1)*16
20 print chr$(205.5+rnd(1));
30 goto 10

Non-consecutive characters version:
10 a(0)=127
20 a(1)=169
30 poke 53272,23
40 print chr$(a(rnd(1)*2));
50 goto 40

Spot painting:
10 poke 53281,1
15 poke 53272,21 20 poke 646,rnd(1)*16 30 print chr$(209); 40 goto 20 Spot painting without white spots: 10 poke 53281,1
14 poke 53272,21 15 c=int(rnd(1)*16) 16 if c=1 then goto 15 20 poke 646,c 30 print chr$(209) 40 goto 15

Snowflakes:
1 poke646,1:print chr$(147):poke53281,0
10 c%(1)=77:c%(0)=78
20 n=int(rnd(1)*40+40)
30 diml%(n):dimf%(n)
40 fori=0ton:l%(i)=rnd(1)*1000+1024:f%(i)=rnd(1)*2:next
50 fori=0ton:pokel%(i),c%(f%(i)):next
60 fori=0ton:pokel%(i),32:l%(i)=l%(i)+40
61 ifl%(i)>2023thenl%(i)=1024+rnd(1)*40
62 ifrnd(1)<.2thengoto70
63 iff%(i)=1thengoto65
64 f%(i)=1:goto70
65 f%(i)=0
70 pokel%(i),c%(f%(i)):next
80 goto 60

Basic sounds in BASIC

clear the chip:
10 for l=54272 TO 54296:
20 poke l,O:next

rem volume:
30 poke 54296,15

rem attack/decay:
40 poke 54277,190 (0-255)

rem sustain/release:
50 poke 54278,248

rem note select (high and low):
60 poke 54273,17:poke 54272,37

rem control chars:
70 $(147) clear

rem start playing:
poke 54276,17 rem (17 can be 17, 33, 65, or 129)

rem time loop to set duration:
80 for t=1 T0 250:next

rem turn off note:
90 poke 54276,16
Copyable version:

10 for l=54272 to 54296:
20 poke l,0:next
30 poke 54296,15
40 poke 54277,190
50 poke 54278,248
60 poke 54273,17:poke 54272,37
70 print chr$(147)
80 poke 54276,17
90 for t=1 to 250:next
100 poke 54276,16