home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Commodore Disk User Volume 3 #1
/
Commodore_Disk_User_Vol.3_1_1989_-.d64
/
design
(
.txt
)
< prev
next >
Wrap
Commodore BASIC
|
2022-10-26
|
8KB
|
411 lines
100 poke 52,112:poke 56,112:clr
110 (NULL) "[201]nit"
120 (NULL) "[197]xec"
130 (NULL) "[211]hut[196]own"
140 end
150 :
160 (NULL) "[201]nit"
170 (NULL)
180 d=0
190 p=2
200 dv=8
210 (NULL) 1,clr
220 (NULL) (NULL) 1,clr
230 (NULL) 1 def 40,1,16+6
240 (NULL) 2 def 21,15,6+1
250 (NULL) 4 def 30,6,16+2
260 (NULL) def 1,1
270 (NULL) (NULL) 100,100
280 (NULL) (NULL) d,p
290 (NULL) 4,0
300 (NULL) def 256,0,0,0,0,0,0,0,0
310 cg=0
320 dim ac(15),sp(8),ch(8,8)
330 restore
340 for i=0 to 15
350 read ac(i)
360 next
370 bc=5:fc=144
380 (NULL) "[211]pr[196]ef"
390 return
400 data 144,5,28,159,156,30,31,158,129,149,150,151,152,153,154,155
410 :
420 (NULL) "[197]xec"
430 (NULL) 1 open 0,0
440 (NULL) (NULL) 1,1
450 print "[147][196]esign [211]ystem";
460 te=0:se=0
470 (NULL)
480 : (NULL) se<>0 then (NULL) 1 (NULL):print "[147][196]esign [211]ystem";
490 : (NULL):(NULL) (NULL)(1)
500 : px=int((NULL)(0)/8)
510 : (NULL) px<=6 then (NULL) "[196]esign[211]ervice"
520 : (NULL) px>=8 and px<=13 then (NULL) "[211]ys[211]ervice"
530 (NULL) te<>0
540 (NULL) (NULL) 0
550 (NULL) 1 close
560 return
570 :
580 (NULL) "[211]hut[196]own"
590 (NULL) (NULL) 0
600 (NULL) 4 clr
610 (NULL) 2 clr
620 (NULL) 1 clr
630 (NULL) (NULL) 0
640 (NULL) 0
650 (NULL)
660 print chr$(142);"program finished"
670 return
680 :
690 (NULL) "[196]esign[211]ervice"
700 (NULL) 3 def 18,1,16+6
710 (NULL) 3 open 0,1
720 print "[196]esign [195]haracters";
730 (NULL) "[205][211]elect"
740 (NULL) se (NULL) "[195]har[196]es"
750 (NULL) se=0 then (NULL) 3 close:(NULL) 3 clr
760 return
770 :
780 (NULL) "[211]ys[211]ervice"
790 (NULL) 3 def 22,1,16+6
800 (NULL) 3 open 8,1
810 print "[197]xit to [194]asic [211]ystem";
820 (NULL) "[205][211]elect"
830 b=0
840 (NULL) se<>0 then op$="[197]xit to [194]asic [211]ystem":(NULL) "[195]onfirm"
850 te=b
860 (NULL) 3 close
870 (NULL) 3 clr
880 return
890 :
900 (NULL) "[205][211]elect"
910 se=0
920 (NULL)
930 (NULL) (NULL)(3) and ((NULL)(p)=128 or (NULL)(p)=16) then se=int((NULL)(1)/8)+1
940 (NULL) (NULL) se=0 and ((NULL)(3) or (NULL)(1))
950 return
960 :
970 (NULL) "[195]onfirm"
980 ow=(NULL)(0)
990 (NULL) 4 open 5,9
1000 print " ![211][212][207][208]!"
1010 print (NULL)((30-len(op$))/2,32);op$
1020 print " [208]ress [194]utton [212]o [195]onfirm"
1030 print " [200]it [210]eturn to [195]ancel"
1040 (NULL) "[203]ey[211]witch"
1050 (NULL) 4 close
1060 (NULL) ow (NULL)
1070 return
1080 :
1090 (NULL) "[203]ey[211]witch"
1100 (NULL)
1110 a=(NULL)(0)
1120 b=(NULL)(p):c=(NULL)(p):(NULL) c=16 then b=128
1130 (NULL) a=13 or b=128
1140 return
1150 :
1160 (NULL) "[195]har[196]es"
1170 (NULL) 3 close
1180 (NULL) 3 clr
1190 (NULL) 1 (NULL)
1200 print "[147][207]ptions [195]haracters";
1210 (NULL) "[195]har[199]rid"
1220 tc=0
1230 (NULL)
1240 (NULL) not((NULL)(2)) then (NULL) 4,0
1250 (NULL) (NULL)(2) then (NULL) "[195]heck[199]rid"
1260 (NULL) (NULL)(1) then (NULL) "[195]heck[200]eader"
1270 (NULL) (NULL) tc
1280 (NULL) 2 close
1290 return
1300 :
1310 (NULL) "[195]har[199]rid"
1320 (NULL) 2 open 10,5
1330 (NULL) 1,0:(NULL) 2,1:(NULL)
1340 (NULL) "[195]lr[199]rid"
1350 (NULL) 11,3:print "[195]har =";
1360 (NULL) 11,4:print "[193]scii=";cd%;
1370 (NULL) 11,5:print "[210]ev = ";rv$;
1380 (NULL) 11,6:print "[211]et =";se%;
1390 (NULL) 1,13:print "[156][198]ile:[146]";
1400 return
1410 :
1420 (NULL) "[195]heck[199]rid"
1430 px=int((NULL)(0)/8):py=int((NULL)(1)/8)
1440 (NULL) px<2 or px>9 or py<2 or py>9 then (NULL) 4,6:return
1450 (NULL) 4,4
1460 (NULL) ((NULL)(p)<>128 and (NULL)(p)<>16) then return
1470 ax=px-1:ay=py-1
1480 m=2^(8-ax)
1490 fg=not(ch(ax,ay))
1500 (NULL) fg then sp(ay)=sp(ay)or m
1510 (NULL) not(fg) then sp(ay)=sp(ay) and (255-m)
1520 ch(ax,ay)=fg
1530 ch$="[207]"
1540 (NULL) ch(px-1,py-1) then ch$=" [146]"
1550 (NULL) px,py:print chr$(142);"[144]";ch$;"";
1560 (NULL) "[213]p[196]ate"
1570 return
1580 :
1590 (NULL) "[195]heck[200]eader"
1600 px=int((NULL)(0)/8)
1610 (NULL) px>=0 and px<=6 then (NULL) "[196]o[207]ption"
1620 (NULL) px>=11 and px<=20 then (NULL) "[196]o[195]haracter"
1630 return
1640 :
1650 (NULL) "[196]o[195]haracter"
1660 ow=(NULL)(0)
1670 (NULL) 3 def 10,6,22
1680 (NULL) 3 open 11,1
1690 print "[211]elect [198]lip [210]everse [195]lear [195]olour [213]pdate";
1700 (NULL) "[205][211]elect"
1710 (NULL) 3 close
1720 (NULL) 3 clr
1730 (NULL) ow (NULL)
1740 (NULL) se<>5 and se<>0 then (NULL) "[194]usy"
1750 (NULL) se (NULL) "[211]el[195]har","[198]lip","[210]everse","[195]lear[195]","[195]olour","[211]ave[195][195]"
1760 (NULL) se<>5 and se<>0 then (NULL) "[206]ot[194]usy"
1770 return
1780 :
1790 (NULL) "[196]o[207]ption"
1800 ow=(NULL)(0)
1810 (NULL) 3 def 20,3,22
1820 (NULL) 3 open 0,1
1830 print "[204]oad [195]haracter [198]ile [211]ave [195]haracter [198]ile[197]xit";
1840 (NULL) "[205][211]elect"
1850 (NULL) 3 close
1860 (NULL) 3 clr
1870 (NULL) ow (NULL)
1880 (NULL) se (NULL) "[204]oad[195][211]et","[211]ave[195][211]et","[195][197]xit"
1890 return
1900 :
1910 (NULL) "[195][197]xit"
1920 (NULL) "[211]ave[195][195]"
1930 tc=-1
1940 return
1950 :
1960 (NULL) "[213]p[196]ate"
1970 (NULL) def 256,sp(1),sp(2),sp(3),sp(4),sp(5),sp(6),sp(7),sp(8)
1980 (NULL) 18,3:printchr$(1);chr$(bc);chr$(fc);"@";
1990 return
2000 :
2010 (NULL) "[199][213]p[196]ate"
2020 (NULL) "[195]lr[199]rid"
2030 for y=1 to 8
2040 for x=1 to 8
2050 ch(x,y)=0
2060 (NULL) (sp(y) and 2^(8-x))<>0 then ch(x,y)=-1:(NULL) 1+x,1+y:print "[144] [146]";
2070 next x,y
2080 return
2090 :
2100 (NULL) "[198]lip"
2110 for y=1 to 4
2120 tp=sp(y)
2130 sp(y)=sp(9-y)
2140 sp(9-y)=tp
2150 next
2160 (NULL) "[199][213]p[196]ate"
2170 (NULL) "[213]p[196]ate"
2180 return
2190 :
2200 (NULL) "[195]lr[199]rid"
2210 print chr$(142);"[144]";
2220 for y=0 to 7
2230 (NULL) 2,2+y
2240 print "[207][207][207][207][207][207][207][207][180]"
2250 next
2260 print "[183][183][183][183][183][183][183][183]"
2270 return
2280 :
2290 (NULL) "[210]everse"
2300 for y=1 to 8
2310 sp(y)=255-sp(y)
2320 next y
2330 (NULL) "[199][213]p[196]ate"
2340 (NULL) "[213]p[196]ate"
2350 return
2360 :
2370 (NULL) "[195]lear[195]"
2380 for y=1 to 8
2390 sp(y)=0
2400 next y
2410 (NULL) "[199][213]p[196]ate"
2420 (NULL) "[213]p[196]ate"
2430 return
2440 :
2450 (NULL) "[195]olour"
2460 (NULL) 4 open 5,15
2470 (NULL) 2,6:(NULL)
2480 (NULL) 6,1
2490 print "[144] [159] [156] [158] [129] [149] [150] [151] [152] [153] [154] [155] [146]";
2500 cx=0:cc=0
2510 (NULL) "[194]col"
2520 (NULL)
2530 (NULL) (NULL)(4) and ((NULL)(p)=128 or (NULL)(p)=16) then (NULL) "[211]el[195]olour"
2540 (NULL) 6,4:print chr$(fc);" [146]";
2550 (NULL) 18,4:print chr$(bc);" [146]";
2560 (NULL) (NULL) cx<>0
2570 (NULL) 4 close
2580 (NULL) 2 (NULL)
2590 (NULL) 18,3:printchr$(1);chr$(bc);chr$(fc);"@";
2600 return
2610 :
2620 (NULL) "[211]el[195]olour"
2630 px=int((NULL)(0)/8):py=int((NULL)(1)/8)
2640 (NULL) py=3 and px>=2 and px<=11 then cc=1:(NULL) "[194]col":return
2650 (NULL) py=3 and px>=14 and px<=23 then cc=2:(NULL) "[194]col":return
2660 (NULL) py=3 and (px=26 or px=27) then cx=-1:return
2670 (NULL) py=1 and px>=6 and px<=20 then sc=px-6
2680 (NULL) cc=2 then bc=ac(sc)
2690 (NULL) cc=1 then fc=ac(sc)
2700 return
2710 :
2720 (NULL) "[194]col"
2730 (NULL) 2,3
2740 print "[198]oreground [155][194]ackground [155][207][203][146]";
2750 (NULL) 2,3
2760 (NULL) cc=1 then print "[198]oreground [155][194]ackground [155][207][203][146]";
2770 (NULL) cc=2 then print "[155][198]oreground [194]ackground [155][207][203][146]";
2780 return
2790 :
2800 (NULL) "[211]el[195]har"
2810 (NULL) 4 open 5,10
2820 print "[150][147] [195]haracter [197]dit [211]election"
2830 (NULL) ci% then (NULL) "[199]ot[193][195]har"
2840 (NULL) ci% then (NULL) 4 close:return
2850 (NULL)
2860 ba%=0
2870 (NULL) 2,2:input "[197]nter [193]scii (0-255): [157][157][157][157]";cd%
2880 (NULL) cd%<32 or (cd%>=128 and cd%<160) then ba%=-1
2890 (NULL) (NULL) ba%
2900 (NULL)
2910 (NULL) 2,3:input "[197]nter [211]et (1 or 2) : [157][157][157][157]";se%
2920 (NULL) (NULL) se%<>1 and se%<>2
2930 (NULL)
2940 (NULL) 2,4:input "[210]everse on ([217]/[206]) : [157][157][157][157]";rv$
2950 (NULL) (NULL) rv$<>"y" and rv$<>"n"
2960 (NULL) 4 close
2970 ci%=-1
2980 (NULL) 2 (NULL)
2990 (NULL) 11,4:print "[193]scii=";cd%;
3000 (NULL) 11,5:print "[210]ev = ";rv$;
3010 (NULL) 11,6:print "[211]et =";se%;
3020 (NULL) "[204]oad[213]p[195]har"
3030 return
3040 :
3050 (NULL) "[199]ot[193][195]har"
3060 (NULL) "[211]ave[195][195]"
3070 (NULL) 2,2:print "[217]ou are already editing"
3080 print " [195]haracter";cd%;"in set";se%
3090 print " [195]haracter has been saved"
3100 print " [195]lick to continue";
3110 (NULL) "[203]ey[211]witch"
3120 print "[150][147] [195]haracter [197]dit [211]election"
3130 ci%=0
3140 return
3150 :
3160 (NULL) "[194]usy"
3170 poke 53276,255
3180 (NULL) def 1,3
3190 (NULL) 20 (NULL) "[211]witch"
3200 return
3210 :
3220 (NULL) "[211]witch"
3230 (NULL) v% then (NULL) def 1,4
3240 (NULL) not(v%) then (NULL) def 1,3
3250 v%=not(v%)
3260 return
3270 :
3280 (NULL) "[206]ot[194]usy"
3290 (NULL) def 1,1
3300 (NULL) clr
3310 poke 53276,0
3320 return
3330 :
3340 (NULL) "[211]ave[195][195]"
3350 (NULL) ra%<(7*4096) then return
3360 for i=0 to 7
3370 poke ra%+i,sp(i+1)
3380 next
3390 return
3400 :
3410 (NULL) "[204]oad[195][211]et"
3420 (NULL) 4 open 5,10
3430 print "[147] [195]haracter [211]et [198]ile [204]oad"
3440 ui%=0:(NULL) "[211]ave[195][195]"
3450 ci%=0
3460 (NULL)
3470 (NULL) 2,2:input "[198]ile:";cf$
3480 (NULL) (NULL) cf$=""
3490 poke 780,1:poke 781,dv:poke 782,0:sys 65466
3500 for i=1 to len(cf$):poke 999+i,asc(mid$(cf$,i,1)):next
3510 poke 780,len(cf$):poke 781,232:poke 782,3:sys 65469
3520 poke 780,0:poke 781,0:poke 782,112:sys 65493
3530 (NULL) dv>8 then df=val((NULL)(dv))
3540 (NULL) df<>0 or (st and (255-64))<>0 then (NULL) "[196]isk[204]oad[197]rr"
3550 (NULL) 4 close
3560 (NULL) 2 (NULL)
3570 (NULL) not ui% then (NULL) 1,13:print "[156][198]ile:[146]";cf$
3580 return
3590 :
3600 (NULL) "[196]isk[204]oad[197]rr"
3610 (NULL) 2,4:print "[208]roblem loading [198]ile. "
3620 (NULL) 2,5:print "[208]ress button to [195]ontinue"
3630 ui%=-1
3640 (NULL) "[203]ey[211]witch"
3650 return
3660 :
3670 (NULL) "[204]oad[213]p[195]har"
3680 ra%=cd%
3690 (NULL) (cd%>=64 and cd%<=95) or (cd%>=160 and cd%<=191) then ra%=cd%-64
3700 (NULL) (cd%>=96 and cd%<=127) then ra%=cd%-32
3710 (NULL) se%=2 then ra%=ra%+256
3720 (NULL) rv$="y" then ra%=ra%+128
3730 ra%=28672+ra%*8
3740 for i=0 to 7
3750 sp(i+1)=peek(ra%+i)
3760 next i
3770 (NULL) "[199][213]p[196]ate"
3780 (NULL) "[213]p[196]ate"
3790 return
3800 :
3810 (NULL) "[211]ave[195][211]et"
3820 (NULL) 4 open 5,10
3830 print "[147] [195]haracter [211]et [198]ile [211]ave"
3840 ui%=0
3850 (NULL)
3860 (NULL) 2,2:input "[198]ile:";cf$
3870 (NULL) (NULL) cf$=""
3880 (NULL) dv,"s0:"+cf$
3890 poke 780,1:poke 781,dv:poke 782,0:sys 65466
3900 for i=1 to len(cf$):poke 999+i,asc(mid$(cf$,i,1)):next
3910 poke 780,len(cf$):poke 781,232:poke 782,3:sys 65469
3920 poke 253,0:poke 254,112
3930 poke 780,253:poke 781,0:poke 782,128:sys 65496
3940 (NULL) dv>8 then df=val((NULL)(dv))
3950 (NULL) df<>0 or (st and (255-64))<>0 then (NULL) "[194]ad[211]ave"
3960 (NULL) 4 close
3970 (NULL) 2 (NULL)
3980 return
3990 :
4000 (NULL) "[194]ad[211]ave"
4010 (NULL) 2,4:print "[208]roblem saving [198]ile. "
4020 (NULL) 2,5:print "[208]ress button to [195]ontinue"
4030 (NULL) "[203]ey[211]witch"
4040 return
4050 :
4060 (NULL) "[211]pr[196]ef"
4070 for i=0 to 127
4080 read y
4090 poke 52736+i,y
4100 next i
4110 return
4120 data 64,0,1,16,170,4,6,170,144,10,170,160,42,170,168,41,105,104,169,235,106
4130 data169,235,106,169,235,106,170,170,170,170,170,170,170,170,170,170,170,170
4140 data166,170,154,169,85,106,170,85,170,42,170,168,10,170,160,5,0,64,0,0,64
4150 data0,0,80,0
4160 data2,0,128,12,170,32,6,170,144,10,170,160,42,170,168,41,105,104,169,235,106
4170 data169,235,106,169,235,106,170,170,170,170,170,170,170,170,170,170,170,170
4180 data 166,170,154,169,85,106,170,85,170,42,170,168,10,170,160,1,0,80,1,0,0
4190 data 5,0,0,0