home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Compute! Gazette 1986 August
/
1986-08.d64
/
kaleidoscope
(
.txt
)
< prev
next >
Wrap
Commodore BASIC
|
2022-09-20
|
3KB
|
116 lines
10 si=15:m=54272:forn=mtom+23:poken,0:next:pokem+24,15:pokem+5,129:pokem+6,129
20 pokem+4,17
30 fori=0to7:readm(i):next:data1,4,25,128,2,10,60,255
40 poke53280,0:poke53281,0:print"[158]":gosub550
50 rem ml addresses
60 kal=49664:a=49696:char=251:x=253:y=254
70 seed=kal+126:pokeseed,255*rnd(-ti)+1
80 pokeseed+1,256*rnd(1):pokex,0:pokey,0:pokechar,228:gosub350
90 rem intro page
100 print"[147] welcome to":print" [213][195][195][195][195][195][195][195][195][195][195][195][195][201]"
110 print" -kaleidoscope-"
120 print" [202][192][192][192][192][192][192][192][192][192][192][192][192][203]"
130 print" press any key to continue"
140 gosub370:pokea,25:goto410
150 rem main loop
160 ifa$="r"thengosub1060
170 syskal:pokem+1,rnd(1)*55+5:fori=1tod:next:geta$:ifa$=""then170
180 v=val(a$):ifa$="0"thend=1
190 ifv>0thend=2.4^v
200 ifa$="q"thengosub1070:end
210 fori=0to7:ifa$=chr$(133+i)thenpokea,m(i)
220 nexti:ifa$="b"thengosub330
230 ifa$="c"thengosub350
240 ifa$=chr$(19)thenprintchr$(147):goto170
250 ifa$="h"thengosub1070:goto410
260 ifa$=" "thengosub370
270 ifa$="[208]"andpeek(49692)=1thengosub1080:wait198,1
280 ifa$="[196]"andpeek(49692)=1thenfg=1:gosub1080:wait198,1
290 ifa$="s"thensi=abs(si-15):pokem+24,si
300 ifa$="p"thengosub1010:pokem+24,si
310 goto160
320 rem black and white
330 poke53280,11:poke53281,11:poke49692,1:return
340 rem color
350 poke53280,0:poke53281,0:poke49692,15:return
360 rem hit any
370 geta$:ifa$<>""then370
380 geta$:ifa$=""then380
390 return
400 rem help message
410 print"[147] controls
420 [153]" shift-p/d : print/2-wide (b/w only)"
430 [153]"f1 through f8 : control complexity"
440 [153]" 0 through 9 : control speed"
450 [153]" b/c : black and white/color"
460 [153]" space : freeze display"
470 [153]" clr : clear screen":[153]" h : help!"
480 [153]" s : silence toggle"
490 [153]" p : program character"
500 [153]" r : randomized characters"
510 [153]" q : quit"
520 [153]" hit any key to start the kaleidoscope":[141]370:[153][199](147)
530 [137]170
540 [143] load ml
550 [153][199](147)"...loading ml"
560 s[178]0:c[178]49664:[129]i[178]c[164]c[170]248:[135]x:[151]i,x:s[178]s[170]x:[130]
570 [139]s[179][177]33124[167][153]"error in data statements":[128]
580 [142]
590 [131] 173,32,194,133,165,32
600 [131]33,194,32,90,194,32
610 [131]33,194,32,90,194,198
620 [131]165,208,240,238,240,193
630 [131]173,240,193,41,15,133
640 [131]252,96,25,32,43,194
650 [131]32,65,194,32,43,194
660 [131]96,32,172,194,32,74
670 [131]194,32,172,194,32,82
680 [131]194,32,172,194,32,74
690 [131]194,32,172,194,96,165
700 [131]253,164,254,133,254,132
710 [131]253,96,169,24,56,229
720 [131]253,133,253,96,169,24
730 [131]56,229,254,133,254,96
740 [131]32,109,194,144,7,32
750 [131]109,194,144,28,176,35
760 [131]32,109,194,144,43,176
770 [131]50,14,127,194,46,126
780 [131]194,144,8,173,127,194
790 [131]73,45,141,127,194,96
800 [131]109,12,198,253,16,4
810 [131]169,24,133,253,96,230
820 [131]253,165,253,201,25,208
830 [131]4,169,0,133,253,96
840 [131]198,254,16,4,169,24
850 [131]133,254,96,230,254,165
860 [131]254,201,25,208,4,169
870 [131]0,133,254,96,32,193
880 [131]194,165,251,160,0,145
890 [131]163,169,212,24,101,164
900 [131]133,164,165,252,145,163
910 [131]96,169,4,133,164,165
920 [131]253,24,105,7,133,163
930 [131]166,254,160,0,32,230
940 [131]194,32,230,194,32,230
950 [131]194,32,237,194,32,230
960 [131]194,32,230,194,32,237
970 [131]194,96,138,10,170,152
980 [131]42,168,96,24,138,101
990 [131]163,133,163,152,101,164
1000 [131]133,164,96
1010 [141]1070:[153]" :cmdcmdcmdcmdcmdcmdcmd";:[133]"#";nu$:[139]nu$[178]"r "[167]1040
1020 nu[178][197](nu$):[139]nu[179]0[176]nu[177]255[167]1010
1030 [151]char,nu
1040 [153]" ":[153]" "
1050 [142]
1060 [151]char,[194](162):[142]
1070 [151]m[170]24,0:[142]
1080 ss[178]55303:cc[178]40:rr[178]24:ww[178]25:[141]1070
1090 [159]4,4:[129]g[178]0[164]rr:[152]4,[199](15);
1100 [139]fg[167][129]f[178]1[164]2:[152]4,[199](14);
1110 [129]n[178]ss[170]g[172]cc[164]ss[170]g[172]cc[170]ww:q[178][194](n)
1120 [139](q[175]15)[178]1[167][152]4,"x";
1130 [139](q[175]15)[179][177]1[167][152]4," ";
1140 [130]n:[152]4,[199](8):[139]fg[167][130]f
1150 [130]g:[129]n[178]1[164]4:[152]4:[130]:[160]4:fg[178]0:[142]