home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Loadstar 82
/
082.d81
/
automaton
(
.txt
)
< prev
next >
Wrap
Commodore BASIC
|
2022-08-26
|
3KB
|
74 lines
10 poke 52,64:poke51,0:clr:rem protect screen memory from basic
20 print"[147]":poke53281,0:poke53280,0
25 q$=" [221] [221]
30 [141]60000
70 [158]57812"automaton.ml",8,0:[151]780,0:[151]781,0:[151]782,128:[158]65493
80 [143] set colors for program
85 b[178]35584:[143] basic interface area
90 [151] b,0:[143] color(0)=black
100 [151] b[170]1,2:[143] color(1)=red
110 [151] b[170]2,5:[143] color(2)=green
120 [151] b[170]3,6:[143] color(3)=blue
130 [151] b[170]4,0:[143] empty rule
140 [143] get random numbers from sid chip
150 [151] 54287,255:[151]54290,128
160 [129] i[178]b[170]5[164]b[170]13:[151]i,[194](54299)[175]3:[130]:[143] random rule
170 [129] i[178]b[170]14[164]b[170]53:[151]i,[194](54299):[130]:[143] random data
180 [151]b[170]54,[194](b[170]14):[143] wrap around
190 [158]32768:[143] start program
200 [143] display current rule on screen
210 [151] 53280,0:[151]53281,0
220 [153]"load"[166]7)"forortantantantantantantantantantantantantantantantantantantantantantan^"
225 [153]q$:[153][163]7)"(NULL) open(NULL)ule = ";
230 [129]i[178]b[170]4[164]b[170]13:[153][199]([194](i)[170][198]("0"));:[130]
235 [153][163]30)"for(NULL)":[153]q$
240 [153][166]7)"-tantantantantantantantantantantantantantantantantantantantantantan<":[153]q$
250 [153][163]7)"(NULL) 1. contlenontinue for(NULL)":[153]q$
255 [153][163]7)"(NULL) 2. contvalnter new rule for(NULL)":[153]q$
260 [153][163]7)"(NULL) 3. cont(NULL)uit to (NULL)(NULL)atnstr$(NULL)(NULL)atn(NULL) for(NULL)":[153]q$
261 [153][163]7)"/tantantantantantantantantantantantantantantantantantantantantantanexp"
262 [153]"open(NULL)eys to press while the show is on:
263 print" [198]1 or [210][197][211][212][207][210][197] [154]- come to this screen"
264 print" [198]3 [154]- start over with new rule
265 [153]" asc5 cont- start over with same rule
266 print" [198]7 [154]- same as [198]5 but starts in center
267 [153]" (NULL)(NULL)(NULL)(NULL) and (NULL)right$(NULL)(NULL)(NULL) cont- faster and slower
268 print" [206][213][205][194][197][210] [203][197][217][211] [154]- change corresponding"
269 print" digit of the rule
270 [161]a$:[139]a$[179]"1"[176]a$[177]"3"[167]270
272 [139]a$[178]"3"[167]500
274 [139]a$[178]"1"[167]190
276 [151]214,2:[153]:[153][163]17)" "
278 [153][163]17)"on";:[141]50000
290 [139][195](q9$)[178]10[167][129]i[178]0[164]9:[151]b[170]4[170]i,[198]([202](q9$,i[170]1,1))[175]3:[130]
340 [137]170
500 [159]15,8,15,"r0:hello connect=hello connect":[132]15,er%:[160]15
510 [139]er%[179][177]63[167][128]
520 [153]"loadstopload"[199](34)"hello connect"[199](34)",8"
530 [153]"run"
540 [151]631,13:[151]632,13:[151]198,2:[128]
10000 [159]15,8,15,"s0:automaton":[160]15:[148]"automaton",8:[128]
50000 q9$[178]"":u9[178]53280:[151]198,0
50010 [161]a$
50020 [151]646,[187](1)[172]15[170]1:[153]"tocmd";:[139]a$[178]""[167]50010
50030 [139]a$[178][199](13)[167][153]" ":[142]
50040 [139](a$[178][199](20)[175][195](q9$))[167]q9$[178][200](q9$,[195](q9$)[171]1):[137]50090
50050 [139][195](q9$)[177][178]10[167]t9%[178][194](u9):[151]u9,1:[151]u9,t9%:[137]50010
50060 [139]a$[179]"0"[176]a$[177]"3"[167]50010
50070 q9$[178]q9$[170]a$
50080 [153]""a$;:[137]50010
50090 [153]" cmdcmd cmd";:[137]50010
60000 [153]"def atn (NULL) (NULL) (NULL) (NULL) atn (NULL) (NULL) (NULL)
60005 print" [159][204]andscapes at the press of a key"
60009 b9$=" "
60010 poke214,14:print:print" [155][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][152]"
60020 fori=0to7:printb9$:next:print" [151][185][185][185][185][185][185][185][185][185][185][185][185][185][185][185][185][185][185][185][185][185][185][185][185][185][185][185][185][185][185][185][185][185][185][185][185][152]"
60030 b9$(0)="[193] [213] [212] [207] [205] [193] [212] [207] [206] [214]1"
60040 b9$(1)="by [206]eal [194]utler"
60050 b9$(2)="([195]) 1991 by [211]oftdisk, [201]nc."
60060 b9$(3)="[208]ublished on [204][207][193][196][211][212][193][210] #82"
60070 b9$(4)="[211]ubscriptions 1-800-831-2694"
60080 b9$(5)="[193]ll [210]ights [210]eserved"
60090 poke214,16:print:fori=0to5:printtab(20-(len(b9$(i))/2))""b9$(i):next
60099 return