home *** CD-ROM | disk | FTP | other *** search
- 100 rem crystal garden
- 110 rem by ian adam
- 120 :
- 130 rem vancouver b.c. canada
- 140 rem (c) march 1989
- 150 :
- 160 :
- 170 print "[147]";
- 180 :
- 190 rem code is first:
- 200 :
- 210 r$="00"
- 220 :
- 230 rem programmer notes:
- 240 :
- 250 rem variables:
- 260 :
- 270 cplot = 5900
- 280 plot = 5903
- 290 scolr = 5909
- 300 cursr = 5912
- 310 dump = 5924
- 320 box = 5933
- 330 ft = 5939
- 340 c = 5952
- 350 cg = 5957
- 360 sa = 5960
- 370 fm = 22*256+240:rem filename base
- 380 :
- 390 goto 940
- 400 :
- 410 :
- 420 : jump table:
- 430 :
- 440 sys cplot : colours & plot
- 450 sys plot : draw screen
- 460 : gets rule from first variable
- 470 : poke c-1, 128 or 0 , to
- 480 : wrap pattern around, or not
- 490 :
- 500 sys plot+3 : extend the same
- 510 sys scolr : set screen colours
- 520 : poke c, background colour
- 530 : poke c+1, colour bytes
- 540 : poke c+2, colour nibbles
- 550 :
- 560 sys cursr, row [,column]
- 570 : set cursor row & optional column
- 580 :
- 590 sys cursr+3 : set split screen
- 600 : poke cg, 0 all graphics
- 610 : poke cg, 40 all text
- 620 : poke cg, 218 +/- split
- 630 :
- 640 sys cursr+6 : cancel split etc.
- 650 sys dump-3 : check for printer
- 660 : peek(172)= 0 means printer ok
- 670 :
- 680 sys dump : print text
- 690 sys dump+3 : print hi-res screen
- 700 sys dump+6 : catch nmi, error
- 710 : poke c+6 & 7 with line number
- 720 :
- 730 sys box : pop message box
- 740 : poke c+4, box colour
- 750 :
- 760 sys box+3 : recall screen
- 770 sys ftop,n : fill top line with n
- 780 :
- 790 :
- 800 : more memory:
- 810 :
- 820 from 5888 10 bytes of structure
- 830 poke c+3, text background colour
- 840 poke sa, 2ndary address, text
- 850 poke sa+1, '' '' , graphics
- 860 poke sa+2, 10 for lf, 0 if not
- 870 :
- 880 : to print these, execute:
- 890 :
- 900 open 4,4,7:cmd 4:list 200-930
- 910 print#4:close 4:end
- 920 :
- 930 :
- 940 bb=255:ul=8192:ur=8504:nb=8:as=48
- 950 k=198:s1=54276:tr=26:br=53280
- 960 :
- 970 rem set seed:
- 980 :
- 990 sys ft,0:sys pl
- 1000 poke 8416,232
- 1010 r$="1031031332"
- 1020 :
- 1030 rem set colours:
- 1040 :
- 1050 poke c,4:poke c+1,216:poke c+2,.
- 1060 :
- 1070 rem plot screen:
- 1080 :
- 1090 poke 53265,27:poke 53269,.
- 1100 sys 5915:rem enable splitscreen
- 1110 poke c-1,.:rem wrap
- 1120 r$="1031031332"
- 1130 sys cp:rem colours, & plot
- 1140 :
- 1150 rem check printer:
- 1160 :
- 1170 sys 5921
- 1180 pr=peek(172)=0
- 1190 :
- 1200 rem more setup:
- 1210 :
- 1220 sys 5930:rem alter vectors
- 1230 j=rnd(-ti)
- 1240 :
- 1250 poke s1+20,128
- 1260 poke s1-3,70:poke s1+11,k:poke s1+16,bb:poke s1+14,129
- 1270 poke s1+1,7:poke s1+2,217:poke s1+20,.
- 1280 :
- 1290 rem more images:
- 1300 :
- 1310 for i=1 to 2000:next
- 1320 r$="3302032210"
- 1330 sys ft,.
- 1340 for i=8296 to 8400 step 8:poke i,20:next
- 1350 poke c,5:poke c+1,33:poke c+2,.
- 1360 sys cp
- 1370 :
- 1380 for i=1 to 2000:next
- 1390 r$="0023010110"
- 1400 sys ft,0
- 1410 poke 8336,2:poke 8416,48
- 1420 poke c,0:poke c+1,34:poke c+2,14
- 1430 sys cp
- 1440 for i=1 to 999:next
- 1450 for i=1 to 6
- 1460 : a=(i and 1)*16+2
- 1470 : poke c+1,a:sys sc
- 1480 : for j=1 to 500-25*a+500*(i=2):next
- 1490 next
- 1500 for i=50 to 242 step 16
- 1510 : poke c+1,i
- 1520 : sys sc
- 1530 : for j=1 to 99:next
- 1540 next
- 1550 :
- 1560 :
- 1570 rem on hidden screen:
- 1580 :
- 1590 poke cg,252
- 1600 print"[154][204][207][193][196][211][212][193][210] presents..."tab(32)"(c) 1989"
- 1610 print" [195]rystal [199]arden for the 64"
- 1620 print" [183][183][183][183][183][183][183][183][183][183][183][183][183][183][183][183][183][183][183][183][183][183][183][183][183][183]"
- 1630 print" [215]hat you have just seen is a"
- 1640 print" demonstration of a new graphics"
- 1650 print" structure, a complex artform that is"
- 1660 print" grown entirely within your computer."
- 1670 print" [205]uch like fractals, these crystals are"
- 1680 print" generated by a simple set of rules.":print
- 1690 print" [194]y varying the structure, you can"
- 1700 print" create a near-infinite variety of"
- 1710 print" crystalline images effortlessly. [217]ou"
- 1720 print" can choose the seed on which the"
- 1730 print" crystals grow, and define their"
- 1740 print" rules of growth. [212]he computer"
- 1750 print" takes it from there, and creates"
- 1760 print" your images.":print
- 1770 print" [214]ideo wallpaper? [217]es, it's that,"
- 1780 print" but [195][210][217][211][212][193][204] [199][193][210][196][197][206] is much, much"
- 1790 print" more... [208]ress [210][197][212][213][210][206] to find out.";
- 1800 :
- 1810 rem reveal it
- 1820 :
- 1830 for i=250 to 26 step-8
- 1840 : poke cg,i:j=1^1
- 1850 next
- 1860 :
- 1870 rem main program
- 1880 :
- 1890 r$="0120123123"
- 1900 wait k,15:poke k,.
- 1910 :
- 1920 gosub 5740, title & beep
- 1930 :
- 1940 gosub 6140, response
- 1950 on reply gosub 2030, 7160, 6230, 5490
- 1960 :
- 1970 goto 1920
- 1980 :
- 1990 rem ========
- 2000 :
- 2010 : enter loop
- 2020 :
- 2030 gosub 6010
- 2040 poke c,c0:poke c+1,c1:poke c+2,c2
- 2050 r$=o$:s=.
- 2060 poke c-1,w
- 2070 i=ls:gosub 3240,seed
- 2080 print"[147]":sys cp
- 2090 :
- 2100 rem * viewing loop *
- 2110 :
- 2120 a=peek(c+2):rem select colour
- 2130 if a=. then a=12
- 2140 poke 646,a:sys cu,20
- 2150 :
- 2160 for i=. to 999:rem await input
- 2170 : if peek(k) then 2380
- 2180 next
- 2190 :
- 2200 print"[195][210][217][211][212][193][204]: n[146] new m[146] manual x[146] extend"
- 2210 if peek(c-1)>127 then print " w[146] no";:goto 2230
- 2220 print" w[146] do";
- 2230 print" wrap r[146] random a[146] autopilot"
- 2240 print"[211][197][197][196]: v[146] vary e[146] enter manually"
- 2250 print"[195][207][204][207][210][211]: [198]keys[146] c[146] random q=quit "
- 2260 print"[207][213][212][208][213][212]: s[146] save l[146] load p[146] print[145]"
- 2270 :
- 2280 tr=210:gosub 5950:a=.:rem show
- 2290 :
- 2300 gosub 5900
- 2310 for i=. to 1600
- 2320 : if peek(k) then 2370
- 2330 next
- 2340 :
- 2350 sys sc:gosub 6010:goto 2120:rem try again
- 2360 :
- 2370 poke cg,.:sys sc
- 2380 get b$
- 2390 for h=1 to 18
- 2400 : if mid$("nxwravpmeslqc[133][134][135][136][140]",h,1)<>b$ then next:h=.
- 2410 :
- 2420 if h>12 then gosub 4130:goto 2120
- 2430 on h gosub 2780,2860,2910,2970,3030,3180,5320,2570,3700,4430,5080
- 2440 if h=12 then s=.:return
- 2450 if h then 2120
- 2460 if val(b$) then h=(27+val(b$)-(val(b$)=8))/2:b$="":goto 2420
- 2470 if a then 2200
- 2480 goto 2120
- 2490 ================
- 2500 :
- 2510 * code entry *
- 2520 :
- 2530 : r$ is 1st variable
- 2540 :
- 2550 : manual entry:
- 2560 :
- 2570 print"[147]":sys cu,18
- 2580 print"[212]he crystal is grown using a structure"
- 2590 print"of ten digits, each 0 to 3."
- 2600 print"[197]nter a code, then press [210][197][212][213][210][206]:"
- 2610 l=.:sys cu,23:print r$"[145]"
- 2620 tr=194:gosub 5950
- 2630 poke 204,.:get b$
- 2640 if (b$>"/" and b$<"4") or b$=" " or b$="" then poke 204,1:print b$;:l=l+1
- 2650 if b$=chr$(20) or b$="[157]" then if l then poke 204,1:print b$;:l=l-1
- 2660 if b$<>chr$(13) and l<14 then 2630
- 2670 poke 204,1
- 2680 :
- 2690 r$=""
- 2700 for i=1944 to 1953
- 2710 : r$=r$+chr$(peek(i) and 51)
- 2720 next
- 2730 sys cp
- 2740 return
- 2750 :
- 2760 : random code
- 2770 :
- 2780 r$=""
- 2790 for i=1 to 10
- 2800 : r$=r$+chr$(rnd(i)*4+as)
- 2810 next
- 2820 sys pl:return
- 2830 :
- 2840 : extend crystal
- 2850 :
- 2860 sys pl+3
- 2870 return
- 2880 :
- 2890 : wrap
- 2900 :
- 2910 poke c-1,bb-peek(c-1)
- 2920 sys pl
- 2930 return
- 2940 :
- 2950 : 1 random
- 2960 :
- 2970 gosub 4280,colors
- 2980 gosub 3220,seed
- 2990 goto 2780,code
- 3000 :
- 3010 : autopilot
- 3020 :
- 3030 for i=1 to 50
- 3040 : gosub 4280
- 3050 : gosub 3220
- 3060 : o$=r$:if peek(k) then return
- 3070 : gosub 2780
- 3080 : if peek(k) then return
- 3090 next
- 3100 gosub 5900:goto 3030
- 3110 :
- 3120 :===============
- 3130 :
- 3140 * seed entry *
- 3150 :
- 3160 : rnd entry, 7 ways
- 3170 :
- 3180 gosub 3220
- 3190 sys pl
- 3200 return
- 3210 :
- 3220 i=int(rnd(i)*7):if i=ls then 3220
- 3230 ls=i:poke cg,.
- 3240 on i goto 3320,3360,3420,3500,3530,3610
- 3250 :
- 3260 rem rnd centre
- 3270 sys ft,.
- 3280 poke 8344,rnd(i)*bb+1
- 3290 return
- 3300 :
- 3310 : 1 rnd byte across
- 3320 sys ft,rnd(i)*bb+1
- 3330 return
- 3340 :
- 3350 : rnd bytes across
- 3360 for i=ul to ur step nb
- 3370 : poke i,rnd(i)*bb
- 3380 next
- 3390 return
- 3400 :
- 3410 : several rnd bytes
- 3420 sys ft,.
- 3430 for i=ul to 8400 step nb
- 3440 : i=i+nb*int(rnd(i)*12)
- 3450 : poke i,rnd(i)*bb
- 3460 next
- 3470 return
- 3480 :
- 3490 : fill portion
- 3500 sys ft,.
- 3510 :
- 3520 rem change portion
- 3530 a=ul+nb*int(rnd(i)*15)
- 3540 b=rnd(i)*bb+1
- 3550 for i=a to a+nb*int(rnd(i)*22+4) step nb
- 3560 : poke i,b
- 3570 next
- 3580 return
- 3590 :
- 3600 : select & random
- 3610 sys ft,.
- 3620 for i=8232 to 8312 step nb
- 3630 : poke i,rnd(i)*bb
- 3640 next
- 3650 poke 8440,rnd(i)*bb+1
- 3660 return
- 3670 :
- 3680 * manual entry *
- 3690 :
- 3700 print"[147]":sys cu,18
- 3710 print" [217]ou may enter seed-value bytes"
- 3720 print" into as many consecutive top-row"
- 3730 print" positions as you wish.":print
- 3740 print" [211]tart position (1 to 40):";
- 3750 tr=194:gosub 5950
- 3760 a$="20":sys ft,.
- 3770 gosub 6940
- 3780 if a>40 then 3760
- 3790 :
- 3800 print"[147]":sys cu,18
- 3810 print"[197]nter consecutive seed values, 0 to"bb
- 3820 print:print"[208]ress [198]1 to quit:"
- 3830 for i=a to 40
- 3840 : sys cu,22:print"[208]osition" i "[157]:"
- 3850 : gosub 6930
- 3860 : if a>bb or b$>"[132]" then 3890
- 3870 : poke 8184+i*nb,a
- 3880 next
- 3890 sys cp:return
- 3900 :
- 3910 * set up menu *
- 3920 :
- 3930 print"[147]":poke br,.:poke c+3,.
- 3940 if s then sys sc:poke cg,.:return
- 3950 o$=r$:r$="0230011133":rem pattern
- 3960 w=peek(c-1):poke c-1,bb
- 3970 c0=peek(c):c1=peek(c+1):c2=peek(c+2)
- 3980 poke c,.:poke c+1,226:poke c+2,13
- 3990 :
- 4000 a=ul+80:a1=144:a2=129:rem 1st line
- 4010 sys ft,a1+1
- 4020 poke ul,1:poke ur,a1
- 4030 poke a-nb,a1:poke a,a2:poke a+nb,a2-1:poke a+16,.
- 4040 b=64:for i=a+24 to 8412 step nb:poke i,b:next
- 4050 poke i,.:poke i+nb,a1:poke i+16,a2
- 4060 :
- 4070 s=bb:sys cp
- 4080 return
- 4090 :==========
- 4100 :
- 4110 * colours *
- 4120 :
- 4130 on h-12 goto 4280,4150,4170,4210,4230,4380
- 4140 :
- 4150 poke c, peek(c)+1 and 15
- 4160 sys sc:return
- 4170 a=peek(c+1) and 15
- 4180 a=a+1 and 15
- 4190 poke c+1, (peek(c+1)and 240)+a
- 4200 sys sc:return
- 4210 poke c+1, peek(c+1)+16 and bb
- 4220 sys sc:return
- 4230 poke c+2, peek(c+2)+1 and 15
- 4240 sys sc:return
- 4250 :
- 4260 : rnd colours
- 4270 :
- 4280 poke c+1,bb*rnd(i):a=peek(c+1) and 15
- 4290 poke c+2,rnd(i)*16:b=peek(c+2)
- 4300 if a=b then 4290
- 4310 i=int(rnd(i)*16)
- 4320 if i=a or i=b then 4380
- 4330 poke c,i
- 4340 sys sc:return
- 4350 :
- 4360 : std colours
- 4370 :
- 4380 poke c,.:poke c+1,226:poke c+2,13
- 4390 sys sc:return
- 4400 :
- 4410 :* save *
- 4420 :
- 4430 print"[147]":gosub7560
- 4440 if fl=. then return
- 4450 sys cu,17,3
- 4460 print"[211]ave [195]rystal to disk as [211][197][197][196] --"
- 4470 d$="w":gosub 4630
- 4480 if a>19 or b$="[133]" then 5260
- 4490 :
- 4500 for i=ul to ur step nb
- 4510 : print#2,str$(peek(i))
- 4520 next
- 4530 print#2,peek(c+1)
- 4540 print#2,peek(c+2)
- 4550 print#2,peek(c)
- 4560 print#2,r$+chr$(peek(c-1))
- 4570 gosub 4820:if a>19 then 5270
- 4580 :
- 4590 goto 5250
- 4600 :
- 4610 : get name, open file
- 4620 :
- 4630 n$="cg."
- 4640 tr=186:gosub 5950
- 4650 print"[208]lease enter the name."
- 4660 print"[208]ress [198]1 escape"
- 4670 print" [198]7 directory:"
- 4680 sys cu,23:print n$"[175] "
- 4690 wait k,15:get b$
- 4700 if b$=chr$(20) or b$="[157]" then if len(n$)>3 then n$=left$(n$,len(n$)-1)
- 4710 if b$=chr$(13) then sys cu,23:print n$" ":goto 4790
- 4720 if b$="[133]" then return
- 4730 if b$="[136]" then gosub 4910:goto 4640
- 4740 if b$<"-" or b$>"z" then 4680
- 4750 if b$>"9" then if b$<"a" then 4680
- 4760 if len(n$)>15 then n$=left$(n$,15)
- 4770 n$=n$+b$:goto 4680
- 4780 :
- 4790 gosub 6010:poke 788,237
- 4800 open 1,8,15
- 4810 open 2,8,8,n$+",p,"+d$
- 4820 input#1,a,b$
- 4830 if a<20 then return
- 4840 tr=210:gosub 5950
- 4850 poke 788,234:print:print"[208]roblem:" b$
- 4860 print"[208]ress space bar"
- 4870 wait k,bb:poke k,.
- 4880 gosub 6010
- 4890 poke 788,234:close 2:close 1:return
- 4900 :
- 4910 poke 788,239:open 1,8,15:open 2,8,0,"$0:cg.*":rem directory
- 4920 print:input#1,a,b$:if a>19 then 4850
- 4930 poke cg,10:b$=chr$(34):c$=" "
- 4940 for i=1 to 8:get#2,a$,a$,a$,a$,a$:next
- 4950 if a$<>b$ then print"[206]o crystals on disk!":goto 4890
- 4960 :
- 4970 for i=1 to 18:get#2,a$
- 4980 if a$<>b$ then printa$;:next:rem name
- 4990 :
- 5000 for i=1 to 30
- 5010 : get#2,a$:if a$=c$ then next
- 5020 for i=1 to 4:get#2,a$,a$,a$:next:rem skip
- 5030 print:get#2,a$:if a$=b$ then 4970
- 5040 goto 4890
- 5050 :
- 5060 :* load *
- 5070 :
- 5080 print"[147]":sys cu,17,3
- 5090 print"[204]oad [195]rystal from [196]isk"
- 5100 d$="r":gosub 4630
- 5110 if a>19 or b$="[133]" then 5260
- 5120 :
- 5130 for i=8192 to 8504 step 8
- 5140 : input#2,a$
- 5150 : poke i,val(a$) and bb
- 5160 next
- 5170 input#2,a$:poke c+1,val(a$) and bb
- 5180 input#2,a$:poke c+2,val(a$) and bb
- 5190 input#2,a$:poke c,val(a$) and bb
- 5200 input#2,r$
- 5210 if len(r$)<11 then poke c-1,.:goto5250
- 5220 poke c-1,val(right$(r$,1))
- 5230 r$=left$(r$,10)
- 5240 :
- 5250 poke 788,234
- 5260 close 2:close 1
- 5270 sys cp
- 5280 return
- 5290 :
- 5300 : print crystal
- 5310 :
- 5320 poke 788,237
- 5330 sys du-3
- 5340 pr=peek(172)=.
- 5350 if pr=. then gosub 5430:gosub 6230:sys sc:goto 6010
- 5360 :
- 5370 sys du+3
- 5380 open 4,4,peek(sa)
- 5390 print#4,chr$(27)chr$(50);
- 5400 :
- 5410 if peek(sa+2) then print#4,chr$(13)chr$(14)"[195][207][196][197]: " r$:print#4
- 5420 close 4
- 5430 poke 788,234
- 5440 return
- 5450 :
- 5460 :
- 5470 * quit crystal *
- 5480 :
- 5490 sys box
- 5500 sys cu,19,.:fori=217to242:pokei,peek(i)or128:next
- 5510 print tab(24)"[150][209]uit [208]rogram"
- 5520 print tab(24)"- [193]re you sure?"
- 5530 print tab(25)"[198]1 [195]ontinue"
- 5550 print tab(25)"[198]7 [210]eturn":print tab(28) "to [204][207][193][196][211][212][193][210]";
- 5580 :
- 5590 gosub 6140
- 5600 if re-7 then return
- 5610 print"[147][199]oodbye from ..."
- 5620 print"[153][195][160][210] [217] [211] [212] [193] [204] [199] [193] [210] [196] [197] [206]"
- 5630 :
- 5640 sys 5918
- 5650 :
- 5660 open15,8,15,"r0:hello connect=hello connect"
- 5670 input#15,a:close15
- 5680 ifa<>63thenend
- 5690 print"[147][144]load"chr$(34)"hello connect"chr$(34)",8"
- 5700 print"run":poke2048,0:poke44,8:poke631,13:poke632,13:poke198,2:end
- 5710 :
- 5720 :* main menu *
- 5730 :
- 5740 poke 788,234:gosub 3930, setup
- 5750 poke cg,154
- 5760 :
- 5770 sys cu,13,6:printtab(10)"[153][204][207][193][196][211][212][193][210] presents"
- 5780 print"[150] [195][160][210][160][217][160][211][160][212][160][193][160][204][160] [160][160][160][199][160][193][160][210][160][196][160][197][160][206]"
- 5790 print"[153][205]ain [205]enu: 1 [154][199]row some [195]rystals "
- 5800 printtab(11)"2 [154][200]elp - [208]rogram [195]ommands "
- 5810 printtab(11)"3 [154][208]rinter [195]ontrols "
- 5820 printtab(11)"4 [154][204]eave [195]rystal [199]arden "
- 5830 print"[153] [208]ress a [206]umber or [198]unction [203]ey "
- 5840 :
- 5850 print"[154] [194]y [201]an [193]dam [214]ancouver [194][195][153]"
- 5860 poke s1,21:poke s1+20,143
- 5870 for i=20 to k step 20:poke s1-3,i:next
- 5880 poke s1,20
- 5890 :
- 5900 i=rnd(-peek(s1+23))
- 5910 return
- 5920 :
- 5930 rem reveal menu
- 5940 :
- 5950 a=peek(cg):if a=. then a=250
- 5960 b=-8
- 5970 goto 6050
- 5980 :
- 5990 rem conceal menu
- 6000 :
- 6010 a=peek(cg):if a<50 then a=50
- 6020 b=8
- 6030 tr=bb
- 6040 :
- 6050 if peek(c+1)=32 then b=b/4
- 6060 for i=a to tr step b
- 6070 : poke cg,i and bb:j=b^2
- 6080 next
- 6090 if tr=bb then poke cg,.
- 6100 tr=26:return
- 6110 :
- 6120 : function key input
- 6130 :
- 6140 print"":wait k,15
- 6150 get a$:re=val(a$)
- 6160 if a$>"[132]" then if a$<"[140]" then re=2*asc(a$)-265:if re>7 then re=re-7
- 6170 if a$=chr$(13) then re=1
- 6180 if re then if re<8 then return
- 6190 goto 6140
- 6200 :
- 6210 :* printer controls *
- 6220 :
- 6230 print"[158][147]"
- 6240 a$=" ":printa$
- 6250 print" [195]rystal [199]arden for the 64 "
- 6260 printa$
- 6270 print tab(48)"[208]rinter [195]ontrols:"
- 6280 tr=24:gosub 5950
- 6290 poke 788,239:sys du-3:poke 788,234:rem test
- 6300 pr=peek(172)=0
- 6310 if pr=0 then 7040
- 6320 :
- 6330 rem ok
- 6340 :
- 6350 print tab(43)"[212]he secondary address for text is"
- 6360 print" set to" peek(sa) "for upper/lower case,"
- 6370 print" text mode, auto line feed."
- 6380 print tab(43)"[212]he secondary address for graphics"
- 6390 print" is set to" peek(sa+1) "for graphics mode,"
- 6400 print" [206][207] line feed."
- 6410 print tab(43)"[208]lease check the manual for your"
- 6420 print" printer or interface for details."
- 6430 print tab(45)"[198]1 [195]hange secondary addresses"
- 6440 print tab(5)"[198]3 [208]rint help screen"
- 6460 print tab(5)"[198]7 [205]ain menu";
- 6470 gosub 6140:if (re and 1)=. then 6470
- 6480 if re=1 then gosub 6620
- 6490 if re=3 then gosub 6540
- 6510 if re=7 then return
- 6520 goto 6230
- 6530 :
- 6540 poke 788,239
- 6550 open 4,4,peek(sa):cmd 4
- 6560 gosub 7320:print#4:close 4
- 6570 poke 788,234
- 6580 return
- 6590 :
- 6600 set sec'y addrs
- 6610 :
- 6620 print"[147]" tab(243)"[212]he text secondary address must"
- 6630 print" be set for upper and lower case,"
- 6640 print" text mode, automatic line feed."
- 6650 print tab(163)"[201]f necessary, check your manual."
- 6660 print tab(163)"[197]nter secondary address, or press"
- 6670 print" [210][197][212][213][210][206] for" peek(sa)
- 6680 gosub 6930
- 6690 if a then poke sa,a and bb
- 6700 :
- 6710 print"[147]" tab(243)"[212]he crystals can only be printed"
- 6720 print" on an [197]pson-compatible printer."
- 6730 print tab(123)"[212]he secondary address must be set"
- 6740 print" for transparent graphics mode,"
- 6750 print" [206][207] line feed. [193] value of 5 works"
- 6760 print" for most interfaces; however,"
- 6770 print" the [212]ymac needs a 6."
- 6780 print tab(123)"[197]nter secondary address, or press"
- 6790 print" [210][197][212][213][210][206] for" peek(sa+1)
- 6800 gosub 6930
- 6810 if a then poke sa+1,a and bb
- 6820 print"[147][195]rystals are normally printed"
- 6830 print"with a space between them."
- 6840 print"[208]ress:":print "[198]1 ok- return"
- 6850 print"[198]7 set printouts with no space between"
- 6860 print" images. [212]his allows you to extend"
- 6870 print" a crystal and print it as one image."
- 6880 gosub 6140:poke sa+2,10*abs(re<7)
- 6890 re=1:return
- 6900 :
- 6910 : input number
- 6920 :
- 6930 a$=""
- 6940 sys cu,23:print a$"[175] "
- 6950 wait k,15:get b$
- 6960 if b$=chr$(20) or b$=chr$(157) then if len(a$) then a$=left$(a$,len(a$)-1)
- 6970 if b$=chr$(13) or b$>"[132]" then a=val(a$):return
- 6980 if b$<"0" or b$>"9" then 6940
- 6990 if len(a$)>2 then a$=left$(a$,2)
- 7000 a$=a$+b$:goto 6940
- 7010 :
- 7020 : no printer
- 7030 :
- 7040 print tab(45)"[212]here is no printer active."
- 7050 print tab(45)"[201]f you have a printer, please"
- 7060 print tab(5)"check that it is properly"
- 7070 print tab(5)"connected, has paper available,"
- 7080 print tab(5)"and is turned on."
- 7090 print tab(165)"[198]1 activate printer"
- 7100 print tab(5)"[198]3 back to menu"
- 7110 gosub 6140:if re=1 then 6230
- 7120 return
- 7130 :
- 7140 :* help screen *
- 7150 :
- 7160 print"[147][150]";
- 7170 tr=24:gosub 5950
- 7180 poke c+3,9:poke br,9
- 7190 :
- 7200 if pr then 7220
- 7210 d$="[150] [208]ress [198]1 to return [157][148] ":goto 7240
- 7220 d$="[150] [198]1 [210]eturn [198]5 [208]rint page [157][148] "
- 7230 :
- 7240 gosub 7320
- 7250 sys cu,24:printd$;
- 7260 wait k,15:get a$
- 7270 if a$="5" or a$="[135]" then if pr then 6540
- 7280 return
- 7290 :
- 7300 : help text
- 7310 :
- 7320 print" [195][210][217][211][212][193][204] [199][193][210][196][197][206] -- [200]elp [211]creen ":print
- 7330 poke 646,1:sys cu,1
- 7340 print"[212]hese are the commands while viewing:":print
- 7350 print"[195]rystal: [206] [206]ew [195]rystal, automatic"
- 7360 print tab(9)"[205] [206]ew [195]rystal, manual"
- 7370 print tab(9)"[216] [197]xtend same crystal"
- 7380 print tab(9)"[215] [212]urn pattern-wrap on or off"
- 7390 print tab(9)"[210] [210]andom crystal and colors"
- 7400 print tab(9)"[193] [193]utopilot (any key = quit)"
- 7410 print"[211]eed: [214] [214]ary pattern (auto seed)"
- 7420 print tab(9)"[197] [197]nter [206]ew [211]eed, manually":print
- 7430 print"[195]olors: [198]1 [194]ackground [195]olor"
- 7440 print tab(8)"[198]3 [195]hange [195]olor 1"
- 7450 print tab(8)"[198]5 [195]hange [195]olor 2"
- 7460 print tab(8)"[198]7 [195]hange [195]olor 3"
- 7470 print tab(8)"[198]8 [211]tandard [195]olors"
- 7480 print tab(9)"[195] [210]andom [195]olors":print
- 7490 print"[197]xtras: [208] [208]rint crystal ([197]pson-type)"
- 7500 print tab(9)"[211] [211]ave crystal to disk"
- 7510 print tab(9)"[204] [204]oad crystal from disk"
- 7520 print tab(9)"[209] [209]uit - back to main menu"
- 7530 return
- 7540 :
- 7550 :
- 7560 print"[147]":gosub5950
- 7570 print" [211]ave picture in which format?"
- 7580 print" [158][203][155]oala"
- 7590 print" [158][193][155]dvanced [207][195][208]"
- 7600 print" [158][211][155]eed (mathematical data)"
- 7610 print" [159][197][154]xit[156]"
- 7620 waitk,15 : geta$
- 7630 ifa$<>"s"thengoto7650
- 7640 fl=1:goto7670
- 7650 ifa$<>"e"thengoto7690
- 7660 fl=0
- 7670 print"[147]":gosub6010:return
- 7680 :
- 7690 ifa$<>"k"thengoto7760
- 7700 ml=10
- 7710 en$="[203]oala":un$="'[193][146]pic ' prefix"
- 7720 gosub 7860:ifms=.thengoto7660
- 7730 poke788,239:sys5632:poke788,234
- 7740 goto7660: rem get back jo-jo
- 7750 :
- 7760 ifa$<>"a"thengoto7620
- 7770 ml=12:px$=""
- 7780 en$="[193]dvanced [207][195][208]"
- 7790 un$="'mpic' suffix"
- 7800 gosub 7860:ifms=.thengoto7660
- 7810 poke788,239:sys5635:poke788,234
- 7820 goto7660: rem to were you belong
- 7830 :
- 7840 :-------------------------------
- 7850 :
- 7860 print"[147][155] [208]lease enter ";en$;"[155] filename --"
- 7870 print" [[205]aximum of";ml;" [155]characters]"
- 7880 print" [159][ ";un$
- 7890 print" is [206][207][212] required.]"
- 7900 ms=. : bs$="" : l$="[164][164][164][164][164][164][164][164][164][164][164][164]"
- 7910 print"[145]";bs$;right$(l$,ml-ms):waitk,15:geta$
- 7920 ifa$="[133]"thenms=.:goto7950
- 7930 ifa$<>chr$(13)thengoto7960
- 7940 ifms>.thengoto8040
- 7950 print"[147]" : return
- 7960 ifa$<>"[157]"anda$<>chr$(20)then7990
- 7970 ifms>0thenms=ms-1:bs$=left$(bs$,ms)
- 7980 goto 7910
- 7990 ifa$<"0"then7910
- 8000 if(a$>"9"anda$<"a")ora$>"z"then7910
- 8010 ifms=mlthen7910
- 8020 bs$=bs$+a$:ms=ms+1:goto7910
- 8030 :
- 8040 ifml<>10thengoto8060
- 8050 fs$=left$(chr$(129)+"pic "+bs$+" ",15):ms=15:goto8070
- 8060 bs$=bs$+" ":fs$=left$(bs$,12)+"mpic":ms=16
- 8070 forx=1toms:poke((fm-1)+x),asc(mid$(fs$,x,1)):next:print"[147]"
- 8080 poke5712,ms : ms=1 : return
- 10000 open15,8,15,"s0:cg.bas":close15:save"cg.bas",8:end
-