start tok64 d64-eAcmcs 140 REM ****************************** 150 REM a simulation of "{141}{down}{right*15}{white}l i f e{light blue}{141}{down}{reverse off}" 160 REM ****************************** 170 REM written by glen bodie 180 REM 90 kingsmount pk rd 190 REM toronto, ontario 200 REM (416) 461-3483 210 REM ****************************** 220 REM you are allowed to copy and distribute this program to anyone, 230 REM but may not use it in any way for profit. 240 REM if you have any questions or suggestions or wish to discuss the 250 REM program, please write or call me at the above address. 260 REM ****************************** 270 REM this is a simulation of the growth, birth and death of cells 280 REM in a closed colony. it is based on a scientific american article 290 REM written by john conway from cambridge university, london in 300 REM october 1970. 310 REM the source for this program is in a combination of basic and ml 320 REM code as follows: 330 REM "life.bas" - basic statements 340 REM "life.asm" - ml statements 350 REM the final program was generated by pal-64 from pro-line. in order 360 REM to recreate the object code, load pal-64 into your machine then 370 REM load and run "life.bas". the assembly takes about 8 minutes. 380 REM the result of the assembly is 2 files on your disk: 390 REM "life" - the executable program 400 REM "life.sym" - the symbol table 410 REM ****************************** 420 REM "{141}{down}{right*13}{white}protected{light blue}{down}"OFF 430 REM ****************************** 440 REM *** setup 450 REM ****************************** 460 PRINT "{clear}"; 470 POKE 53280,6 : POKE 53281,12 480 i=10*4096-3*(40*60)-2*1024 490 POKE 52,i/256 : POKE 56,PEEK(52) 500 POKE 51,i-PEEK(52)*256 510 POKE 55,PEEK(51) 520 t$="{clear}{space*16}{black}{reverse on}l i f e{reverse off}" 530 i$="initialization: phase {reverse on}" 540 ms$="{home}{down*23}{blue}" 550 PRINT t$ms$i$"1{reverse off}"; 560 DIM zz%(255,1) : DIM de$(15) 570 skip=0 : parm=255 : buff=704 575 sc%=0 : z=-1 580 REM ****************************** 590 REM *** transfer character set 600 REM ****************************** 610 POKE 56334,PEEK(56334) AND 254 620 POKE 1,PEEK(1) AND 251 630 FOR i=53248 TO 55296 640 POKE i-2048,PEEK(i) : NEXT 650 POKE 1,PEEK(1) OR 4 660 POKE 56334,PEEK(56334) OR 1 670 REM ****************************** 680 REM *** change screen pointers 690 REM ****************************** 700 PRINT CHR$(8) 710 POKE 56578,PEEK(56578) OR 3 720 POKE 56576,PEEK(56576)AND 252 730 POKE 53272,(PEEK(53272)AND 240)OR 2 740 POKE 648,196 750 PRINT t$ms$i$"2{reverse off}"; 760 vic2=12*4096 : REM vic-ii chip 770 sm=vic2+1024 : REM screen memory 780 ch=vic2+2048 : REM character set 790 cm=55296 : REM colour memory 800 REM ****************************** 810 REM *** define new characters 820 REM ****************************** 830 nc%=70 : REM new character's code 840 FOR i=0 TO 15 : FOR j=0 TO 7 850 READ i% : POKE ch+8*(i+nc%)+j,i% 860 NEXT j : NEXT i 870 DATA 0,0,0,0,0,0,0,0 880 DATA 240,240,240,240,0,0,0,0 890 DATA 15,15,15,15,0,0,0,0 900 DATA 255,255,255,255,0,0,0,0 910 DATA 0,0,0,0,240,240,240,240 920 DATA 240,240,240,240,240,240,240,240 930 DATA 15,15,15,15,240,240,240,240 940 DATA 255,255,255,255,240,240,240,240 950 DATA 0,0,0,0,15,15,15,15 960 DATA 240,240,240,240,15,15,15,15 970 DATA 15,15,15,15,15,15,15,15 980 DATA 255,255,255,255,15,15,15,15 990 DATA 0,0,0,0,255,255,255,255 1000 DATA 240,240,240,240,255,255,255,255 1010 DATA 15,15,15,15,255,255,255,255 1020 DATA 255,255,255,255,255,255,255,255 1030 REM ****************************** 1040 REM *** define sprites for cursor 1050 REM ****************************** 1060 FOR i=12 TO 63 :POKE vic2+64*1+i,0 1070 POKE vic2+64*2+i,0 : NEXT 1080 FOR i=0 TO 11 : READ i% 1090 POKE vic2+64*1+i,i% : NEXT 1100 FOR i=0 TO 11 : READ i% 1110 POKE vic2+64*2+i,i% : NEXT 1120 POKE 53269,0 : POKE 53275,0 1130 POKE 53287,7 : POKE sm+1016,1 1140 POKE 53271,0 : POKE 53277,0 1150 DATA 240,0,0,144,0,0,144,0,0,240,0,0 1160 DATA 0,0,0,96,0,0,96,0,0,0,0,0 1170 REM ****************************** 1180 REM *** define menu items 1190 REM ****************************** 1200 fk$(1)="{home}{down*2}{black}{reverse on}f1{reverse off} edit {left*8}{down}{reverse on}f2{reverse off} rerun{left*8}{down*2}{reverse on}f3{reverse off} run{space*2}{left*8}{down}" 1210 fk$(1)=fk$(1)+"{reverse on}f4{reverse off} skip {left*8}{down*2}{reverse on}f5{reverse off} scrol{left*8}{down}{reverse on}f6{reverse off} centr{left*8}" 1220 fk$(1)=fk$(1)+"{down*2}{reverse on}f7{reverse off} exit {left*8}{down}{reverse on}f8{reverse off} help {left*8}{down*3}skip:{space*3}{left*8}" 1230 fk$(1)=fk$(1)+"{down*2}gen:{space*4}{home}" 1240 fk$(2)="{home}{down*2}{black}{reverse on}f1{reverse off} load {left*8}{down}{reverse on}f2{reverse off} reset{left*8}{down*2}{reverse on}f3{reverse off} save {left*8}{down}" 1250 fk$(2)=fk$(2)+"{reverse on}f4{reverse off}{space*6}{left*8}{down*2}{reverse on}f5{reverse off} clear{left*8}{down}{reverse on}f6{reverse off}{space*6}{left*8}" 1260 fk$(2)=fk$(2)+"{down*2}{reverse on}f7{reverse off} retrn{left*8}{down}{reverse on}f8{reverse off} help {left*8}{down*3}{space*8}{left*8}" 1270 fk$(2)=fk$(2)+"{down*2}{space*8}{home}" 1280 REM ****************************** 1290 REM *** define messages 1300 REM ****************************** 1310 sg$="{home}{down*15}{right*5}{black} " 1320 ms$(0)="ready{.*5}{space*28}" 1330 ms$(1)="cursors to move, space bar to add/del{sh space}" 1340 ms$(2)="update by 1 generation{space*16}" 1350 ms$(3)="enter # of generations to skip:{space*7}{left*6}" 1360 ms$(4)="cursors are now active for scrolling{space*2}" 1370 ms$(5)="centre the pattern{space*20}" 1380 ms$(6)="enter file to load:{space*19}{left*18}" 1390 ms$(7)="enter file to save:{space*19}{left*18}" 1400 ms$(8)="the colony will be destroyed{space*10}" 1410 ms$(9)="scrolling{.*5}{space*24}" 1420 ms$(10)="rerunning sequence from the start.{space*4}" 1430 c$="{black}press {blue}{reverse on}shift{reverse off}{black} to continue{.*5}{space*5}" 1440 REM ****************************** 1450 REM *** disk error messages 1460 REM ****************************** 1470 de$="{red}disk error: " 1480 de$(0)="no error" 1490 de$(1)="too many open files" 1500 de$(2)="file already open" 1510 de$(3)="file not open" 1515 de$(14)="end or identify" 1520 de$(4)="file not found" 1530 de$(5)="device not present" 1540 de$(6)="file not input type" 1550 de$(7)="file not output type" 1560 de$(8)="file name missing" 1570 de$(9)="illegal device #" 1580 de$(10)="stop key pressed" 1590 de$(11)="rs-232 buffer alloc" 1600 de$(12)="timeout write" 1610 de$(13)="timeout read" 1620 de$(14)="end or ident line" 1630 de$(15)="device not present" 1640 REM ****************************** 1650 REM *** create the field 1660 REM ****************************** 1670 PRINT t$ms$i$"3{reverse off}{home}" 1680 FOR i=2 TO 21 : FOR j=9 TO 38 1690 POKE cm+i*40+j,0 1700 POKE sm+i*40+j,nc% 1710 NEXT j : NEXT i 1720 PRINT TAB(8)"{blue}{cm d}{cm i*30}" 1730 FOR i=2 TO 21 1740 PRINT TAB(8)"{reverse on}{cm k}" : NEXT 1750 PRINT TAB(8)"{cm c}{reverse on}{cm i*30}" 1760 POKE sm+79,123 : POKE cm+79,6 1770 POKE sm+919,126 : POKE cm+919,6 1780 FOR i=119 TO 879 STEP 40 1790 POKE sm+i,97 : POKE cm+i,6 : NEXT 1800 REM ****************************** 1810 REM *** main menu + key decoding 1820 REM ****************************** 1830 POKE parm,1 : SYS18635 1840 POKE parm,1 : SYS20574 1850 pg%=1 : sc%=0 : POKE 53269,0 1860 PRINT fk$(pg%); 1870 POKE 198,0 : PRINT ms$ms$(0); 1880 GOSUB 2020 1890 GET k$ : IF k$ = "" THEN GOTO 1890 1900 k=ASC(k$) 1910 IF k<133 THEN GOTO 1930 1920 ON k-132 GOTO 2980,2340,2600,2750,2070,2450,2660,4270 1930 IF sc%=0 THEN GOTO 1890 1940 IF k=145 THEN POKE parm,1 : GOTO 2890 1950 IF k=017 THEN POKE parm,2 : GOTO 2890 1960 IF k=157 THEN POKE parm,3 : GOTO 2890 1970 IF k=029 THEN POKE parm,4 : GOTO 2890 1980 GOTO 1890 1990 REM ****************************** 2000 REM *** update the gen/skip data 2010 REM ****************************** 2020 PRINT sg$RIGHT$(STR$(skip),2)"{left*8}{down*2}{right*4} "RIGHT$(" "+STR$(gen),3) 2030 RETURN 2040 REM ****************************** 2050 REM *** rerun the whole thing 2060 REM ****************************** 2070 WAIT 653,1,1 : REM till no shift 2080 PRINT ms$ms$(10); 2090 POKE parm,2 : SYS20574 2100 SYS18712 2110 gen=0 : GOSUB 2020 2120 FOR i=0 TO z : i%=PEEK(653) 2130 IF (i% AND 1)=1 THEN GOTO 2300 2140 IF (i% AND 4)=0 THEN GOTO 2160 2150 FOR k=1 TO 600 : NEXT k 2160 ON zz%(i,0) GOTO 2180,2250,2270 2170 GOTO 2290 2180 FOR j=1 TO zz%(i,1) : i%=PEEK(653) 2190 IF (i% AND 1)=1 THEN GOTO 2300 2200 IF (i% AND 4)=0 THEN GOTO 2220 2210 FOR k=1 TO 600 : NEXT k 2220 SYS19045 : SYS18712 2230 gen=gen+1 : GOSUB 2020 2240 NEXT j : GOTO 2290 2250 POKE parm,zz%(i,1) : SYS19883 2260 GOTO 2280 2270 SYS20381 2280 SYS18712 2290 NEXT i 2300 sc%=0 : GOTO 1870 2310 REM ****************************** 2320 REM *** run for 1 generation 2330 REM ****************************** 2340 PRINT ms$ms$(2); : gen=gen+1 2350 SYS19045 2360 SYS18712 2370 IF z=-1 THEN GOTO 2400 2380 IF zz%(z,0)=1 THEN zz%(z,1)=zz%(z,1)+1 : GOTO 2410 2390 IF z=255 THEN GOTO 2410 2400 z=z+1 : zz%(z,0)=1 : zz%(z,1)=1 2410 sc%=0 : GOTO 1870 2420 REM ****************************** 2430 REM *** skip # of generations 2440 REM ****************************** 2450 PRINT ms$ms$(3); : sc%=0 2460 INPUT n : IF n<1 THEN n=1 2470 IF n>99 THEN n=99 2480 IF z=-1 THEN GOTO 2510 2490 IF zz%(z,0)=1 THEN zz%(z,1)=zz%(z,1)+n : GOTO 2520 2500 IF z=255 THEN GOTO 2520 2510 z=z+1 : zz%(z,0)=1 : zz%(z,1)=n 2520 FOR skip=n TO 1 STEP -1 2530 SYS19045 : SYS18712 2540 gen=gen+1 : GOSUB 2020 2550 NEXT 2560 SYS18712 : GOTO 1870 2570 REM ****************************** 2580 REM *** scroll the pattern 2590 REM ****************************** 2600 PRINT ms$ms$(4); 2610 FOR t=1 TO 600 : NEXT 2620 sc%=1 : GOTO 1870 2630 REM ****************************** 2640 REM *** centre the pattern 2650 REM ****************************** 2660 PRINT ms$ms$(5); : sc%=0 2670 SYS20381 2680 SYS18712 2690 IF z=255 THEN GOTO 2710 2700 z=z+1 : zz%(z,0)=3 : zz%(z,1)=0 2710 GOTO 1870 2720 REM ****************************** 2730 REM *** program end 2740 REM ****************************** 2750 POKE 53272,(PEEK(53272)AND 240)OR5 2760 POKE 56576,PEEK(56576) OR 3 2770 POKE 56578,PEEK(56578) OR 3 2780 POKE 648,4 2790 i=10*4096 : REM reset top of memry 2800 POKE 52,i/256 : POKE 56,PEEK(52) 2810 POKE 51,i-PEEK(52)*256 2820 POKE 55,PEEK(51) : CLR 2830 POKE 53280,14 : POKE 53281,6 2840 PRINT "{clear}{light blue}life is over"CHR$(9) 2850 GOTO 5370 2860 REM ****************************** 2870 REM *** move the pattern around 2880 REM ****************************** 2890 PRINT ms$ms$(9); 2900 SYS19883 2910 SYS18712 2920 IF z=255 THEN GOTO 2940 2930 z=z+1 : zz%(z,0)=2 : zz%(z,1)=PEEK(parm) 2940 GOTO 1870 2950 REM ****************************** 2960 REM *** edit menu + key decoding 2970 REM ****************************** 2980 pg%=2 : sp%=1 : re%=0 2990 POKE sm+1016,sp% : POKE 53269,1 3000 POKE 53248,96 : POKE 53249,66 3010 POKE 53264,0 3020 PRINT fk$(pg%); : sc%=0 3030 POKE 198,0 : PRINT ms$ms$(1); 3040 GET k$ : IF k$="" THEN GOTO 3140 3050 k=ASC(k$) 3060 IF k<133 THEN GOTO 3080 3070 ON k-132 GOTO 3350,3630,4040,4120,3570,3140,3140,4270 3080 x%=PEEK(53248)+256*(PEEK(53264) AND 1) : y%=PEEK(53249) 3090 IF k=032 THEN GOTO 4220 3100 IF k=145 THEN GOTO 3210 3110 IF k=017 THEN GOTO 3230 3120 IF k=157 THEN GOTO 3250 3130 IF k=029 THEN GOTO 3270 3140 FOR t=1 TO 25 : NEXT 3150 sp%=sp%-(sp%=1)+(sp%=2) 3160 POKE sm+1016,sp% 3170 GOTO 3040 3180 REM ****************************** 3190 REM *** move the cursor around 3200 REM ****************************** 3210 y%=y%-4 : IF y%<66 THEN y%=222 3220 GOTO 3240 3230 y%=y%+4 : IF y%>222 THEN y%=66 3240 POKE 53249,y% : GOTO 3140 3250 x%=x%-4 : IF x%<96 THEN x%=332 3260 GOTO 3280 3270 x%=x%+4 : IF x%>332 THEN x%=96 3280 POKE 53264,x%/256 3290 POKE 53248,x%-256*PEEK(53264) 3300 FOR t=1 TO 10 : NEXT 3310 GOTO 3150 3320 REM ****************************** 3330 REM *** load a new pattern 3340 REM ****************************** 3350 POKE 53269,0 3360 PRINT ms$ms$(6); 3370 GOSUB 3900 : fl$=fl$+"r" 3380 POKE buff+0,LEN(fl$) 3390 FOR i=1 TO LEN(fl$) 3400 POKE buff+i,ASC(MID$(fl$,i,1)) 3410 NEXT 3420 OPEN 15,8,15 3430 SYS20715 : i=PEEK(parm) 3440 INPUT#15,en$,em$ 3450 IF VAL(en$)<>0 THEN GOTO 3480 3460 IF i=0 OR i=14 THEN re%=1 : GOTO 3510 3470 em$=de$(i) 3480 PRINT ms$de$LEFT$(em$+"{space*30}",26); 3490 FOR t=1 TO 1000 : NEXT 3500 POKE parm,2 : SYS20574 3510 SYS18712 3520 CLOSE 2 : CLOSE 15 3530 POKE 53269,1 : GOTO 3030 3540 REM ****************************** 3550 REM *** reset to the original 3560 REM ****************************** 3570 POKE parm,2 : SYS20574 3580 SYS18712 3590 re%=1 : GOTO 3140 3600 REM ****************************** 3610 REM *** save the current pattern 3620 REM ****************************** 3630 POKE 53269,0 3640 PRINT ms$ms$(7); 3650 GOSUB 3900 : fl$=fl$+"w" 3660 OPEN 15,8,15 3670 POKE buff+0,LEN(fl$) 3680 FOR i=1 TO LEN(fl$) 3690 POKE buff+i,ASC(MID$(fl$,i,1)) 3700 NEXT 3710 SYS20867 : i=PEEK(parm) 3720 INPUT#15,en$,em$ 3730 IF VAL(en$)=0 THEN GOTO 3810 3740 IF VAL(en$)<>63 THEN GOTO 3830 3750 PRINT ms$"{red}file exists.{space*2}replace (yes or no)?{blue}{space*5}{left*4}"; 3760 GET k$ : IF k$="" THEN GOTO 3760 3770 IF k$<>"y" AND k$<>"n" THEN GOTO 3760 3780 PRINT k$; 3790 IF k$="n" THEN GOTO 3850 3800 fl$="@"+fl$ : GOTO 3670 3810 IF i=0 THEN GOTO 3850 3820 em$=de$(i) 3830 PRINT ms$de$LEFT$(em$+"{space*30}",26); 3840 FOR t=1 TO 1000 : NEXT 3850 CLOSE 2 : CLOSE 15 3860 POKE 53269,1 : GOTO 3030 3870 REM ****************************** 3880 REM *** get the filename from user 3890 REM ****************************** 3900 fl$="" : n=0 3905 GET k$ : IF k$="" THEN GOTO 3905 3910 IF k$=CHR$(13) THEN GOTO 3945 3915 IF k$CHR$(221) THEN GOTO 3930 3920 IF k$>CHR$(93) AND k$11 THEN fl$=LEFT$(fl$,11) 3990 fl$=k$+fl$+".life,s," 4000 RETURN 4010 REM ****************************** 4020 REM *** wipe out the pattern 4030 REM ****************************** 4040 PRINT ms$ms$(8); 4050 FOR t=1 TO 400 : NEXT 4060 POKE parm,1 : REM current array 4070 SYS18635 : SYS18712 4080 re%=1 : GOTO 3030 4090 REM ****************************** 4100 REM *** return to main menu 4110 REM ****************************** 4120 IF re%=0 THEN GOTO 4180 4130 POKE parm,1 : SYS20574 4140 IF z=-1 THEN GOTO 4180 4150 FOR i=0 TO z 4160 zz%(i,0)=0 : zz%(i,1)=0 : NEXT 4170 gen=0 : z=-1 4180 GOTO 1850 4190 REM ****************************** 4200 REM *** add/delete a dot 4210 REM ****************************** 4220 SYS18847 4230 re%=1 : GOTO 3140 4240 REM ****************************** 4250 REM *** help information 4260 REM ****************************** 4270 POKE 53269,0 4280 POKE parm,1 : SYS20457 4290 PRINT t$"{down*5}" 4300 PRINT TAB(5)"{reverse on}f1{reverse off} general info{down}" 4310 PRINT TAB(5)"{reverse on}f3{reverse off} function keys{down}" 4320 PRINT TAB(5)"{reverse on}f5{reverse off} return" 4330 PRINT "{down*3}"TAB(5)"press the function key{.*4}" 4340 GET k$ : IF k$="" THEN 4340 4350 IF ASC(k$)<133 OR ASC(k$)>135 THEN GOTO 4340 4360 ON ASC(k$)-132 GOTO 4430,4890,4370 4370 POKE parm,2 : SYS20457 4380 IF pg%=1 THEN GOTO 1870 4390 POKE 53269,1 : GOTO 3140 4400 REM ****************************** 4410 REM *** general information 4420 REM ****************************** 4430 PRINT t$"{down}" 4440 PRINT "{blue}life{black} is a simulation of the birth," 4450 PRINT "death and growth of cells in a closed" 4460 PRINT "environment.{space*2}each generation develops" 4470 PRINT "by looking at the 8 neighbouring cells" 4480 PRINT "of each cell in the current generation." 4490 PRINT "the rules used in this evaluation are:" 4500 PRINT "{down}{blue}{space*2}gen n{space*2}neighbours{space*2}gen n+1" 4510 PRINT "{black}{space*2}alive{space*2}0,1{.*7}{space*2}death (isolation)" 4520 PRINT "{space*9}2,3{.*7}{space*2}stays alive" 4530 PRINT "{space*9}4,5,6,7,8.{space*2}death (crowded)" 4540 PRINT "{space*2}empty{space*2}0,1,2{.*5}{space*2}no change" 4550 PRINT "{space*9}3{.*9}{space*2}new cell is born" 4560 PRINT "{space*9}4,5,6,7,8.{space*2}no change" 4570 PRINT "{down}thus each successive generation is a" 4580 PRINT "direct result of the previous one." 4590 PRINT ms$c$; 4600 WAIT 653,1,0 4610 PRINT t$"{down}" 4620 PRINT "many of the initial patterns of cells" 4630 PRINT "will grow and change in bizarre ways." 4640 PRINT "some will devolve into single or sets" 4650 PRINT "of stable or oscillating patterns:{down}" 4660 c=102 : REM first character 4670 PRINT "{blue}{reverse on}stable{reverse off}{space*3}block{space*2}{black}"CHR$(c+15)"{space*5}{blue}boat{space*2}{black}"; 4680 PRINT CHR$(c+6)CHR$(c+9) 4690 PRINT TAB(28)CHR$(c+2)CHR$(c+1)"{down}" 4700 PRINT "{blue}{reverse on}oscillating{reverse off}{space*2}streetlights{space*3}{black}" 4710 PRINT TAB(13)CHR$(c+0)CHR$(c+8)CHR$(c+12)CHR$(c+0)CHR$(c+0); 4720 PRINT TAB(25)CHR$(c+0)CHR$(c+0)CHR$(c+5)CHR$(c+0)CHR$(c+0) 4730 PRINT TAB(13)CHR$(c+8)CHR$(c+0)CHR$(c+0)CHR$(c+8)CHR$(c+0); 4740 PRINT TAB(25)CHR$(c+0)CHR$(c+0)CHR$(c+1)CHR$(c+0)CHR$(c+0) 4750 PRINT TAB(13)CHR$(c+10)CHR$(c+0)CHR$(c+0)CHR$(c+10)CHR$(c+0); 4760 PRINT TAB(25)CHR$(c+3)CHR$(c+1)CHR$(c+0)CHR$(c+3)CHR$(c+1) 4770 PRINT TAB(13)CHR$(c+0)CHR$(c+8)CHR$(c+12)CHR$(c+0)CHR$(c+0); 4780 PRINT TAB(25)CHR$(c+0)CHR$(c+0)CHR$(c+5)CHR$(c+0)CHR$(c+0) 4790 PRINT TAB(13)CHR$(c+0)CHR$(c+0)CHR$(c+0)CHR$(c+0)CHR$(c+0); 4800 PRINT TAB(25)CHR$(c+0)CHR$(c+0)CHR$(c+1)CHR$(c+0)CHR$(c+0) 4810 PRINT "{down}there are many other interesting" 4820 PRINT "patterns possible.{space*2}experiment a bit" 4830 PRINT "and see the wide variety of {blue}life{black}." 4840 PRINT ms$c$; 4850 WAIT 653,1,0 : GOTO 4290 4860 REM ****************************** 4870 REM *** function key information 4880 REM ****************************** 4890 PRINT t$"{down}" 4900 IF pg%=2 THEN GOTO 5120 4910 PRINT "{black}{reverse on}f1{reverse off} edit{space*4}{blue}create a new pattern or edit" 4920 PRINT TAB(14)"the existing one." 4930 PRINT "{black}{reverse on}f2{reverse off} rerun{space*3}{blue}replay the sequence so far." 4940 PRINT TAB(14)"{black}ctrl{blue} = slow;{black}shift{blue} = halt" 4950 PRINT "{black}{reverse on}f3{reverse off} run{space*5}{blue}update the pattern through" 4960 PRINT TAB(14)"one generation." 4970 PRINT "{black}{reverse on}f4{reverse off} skip{space*4}{blue}skip over a specified" 4980 PRINT TAB(14)"number of generations." 4990 PRINT "{black}{reverse on}f5{reverse off} scrol{space*3}{blue}enable the {black}crsr{blue} keys to" 5000 PRINT TAB(14)"allow scrolling." 5010 PRINT "{black}{reverse on}f6{reverse off} centr{space*3}{blue}centre the pattern in the" 5020 PRINT TAB(14)"display area." 5030 PRINT "{black}{reverse on}f7{reverse off} exit{space*4}{blue}quit the program." 5040 PRINT 5050 PRINT "{black}{reverse on}f8{reverse off} help{space*4}{blue}callup a menu to get" 5060 PRINT TAB(14)"program information.{black}" 5070 PRINT "{down}{black}the first thing to do is enter {blue}edit{black} " 5080 PRINT "mode ({reverse on}f1{reverse off}) to create the pattern of" 5090 PRINT "cells in the initial colony." 5100 PRINT ms$c$; 5110 WAIT 653,1,0 : GOTO 4290 5120 PRINT "{black}{reverse on}f1{reverse off} load{space*4}{blue}load a new pattern from a" 5130 PRINT TAB(14)"disk file.(name<11 chars)" 5140 PRINT "{black}{reverse on}f2{reverse off} reset{space*3}{blue}change the pattern back to" 5150 PRINT TAB(14)"the original pattern." 5160 PRINT "{black}{reverse on}f3{reverse off} save{space*4}{blue}save the pattern in a" 5170 PRINT TAB(14)"disk file.(name<11 chars)" 5180 PRINT "{black}{reverse on}f4{reverse off}{space*9}{blue}no function." 5190 PRINT 5200 PRINT "{black}{reverse on}f5{reverse off} clear{space*3}{blue}erase the current pattern." 5210 PRINT 5220 PRINT "{black}{reverse on}f6{reverse off}{space*9}{blue}no function." 5230 PRINT 5240 PRINT "{black}{reverse on}f7{reverse off} retrn{space*3}{blue}return to the main program" 5250 PRINT TAB(14)"display and menu." 5260 PRINT "{black}{reverse on}f8{reverse off} help{space*4}{blue}callup a menu to get" 5270 PRINT TAB(14)"program information.{black}" 5280 PRINT "{down}note: if the pattern gets changed, the" 5290 PRINT "rerun sequence gets erased, the gen." 5300 PRINT "counter is reset to 0, and a new start-" 5310 PRINT "ing pattern is saved." 5320 PRINT ms$c$; 5330 WAIT 653,1,0 : GOTO 4290 5340 REM ****************************** 5350 REM *** end and link to ml code 5360 REM ****************************** 5370 END stop tok64 (bastext 1.0)