home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Commodore Disc 47
/
Commodore_Disc_47_19xx_-_de.d64
/
edelgraf
(
.txt
)
< prev
next >
Wrap
Commodore BASIC
|
2022-10-26
|
18KB
|
612 lines
1 poke53280,14:poke53281,0:poke646,1:printchr$(147);
2 ifpeek(56)=153andpeek(49153)=224then400
3 poke56,153:clr:gosub12:sys50941:sys50906,1,0:sys50990:sys51090:gosub70
4 gosub100:sys50774,4,4:sys50088,32,12,"[197]delgraf":sys50774,1,1
5 sys50088,64,144,"[196]as noble [199]rafikprogramm":sys50088,128,160,"von [193].[205]."
6 poke49605,2:sys52569,56,136,264,176
7 sys52030,8,"edelgraf.titel",0,1:sys51991,8,"edelgraf.def",54272,4
8 sys65484:close8:gosub15
9 fori=1to5000:geta$:ifa$<>""theni=5000
10 next:goto470
12 sys57812"edelgraf.mc1",8,0:poke780,0:poke781,0:poke782,192:sys65493
14 sys51991,8,"edelgraf.mc2",39168,7:sys65484:close8:return
15 y=64:x=88:a$="k":gosub19:fori=1to1000:next
16 x=9:y=11:t$="edelgraf":forj=1to8
17 a$=mid$(t$,j,1):gosub19:next:return
19 gosub5250:sys52948,x,y,0,0:gosub5270:x=x+dx:return
20 ifnotcsthensys49264,x,y:return
21 poke49605,2:sys49415,0,y,319,y:sys49415,x,0,x,199:poke49605,3:return
30 s=-1
40 return
50 ifnotsthen20
60 return
70 sys52259,65024,1024,320,0:sys52259,57280,1344,40,0:poke49634,0:poke49605,3
80 poke49863,2:sys50774,1,1:sys51090:sys50873,1,0:poke49154,3:return
100 sys52259,1024,65024,320,0:sys52259,1344,57280,40,0:poke49154,0:return
110 an=0:fg=notfg:iffgthenan=-1:ca=0:tr=0
120 goto150
130 poke49634,0:ml=0:iffmandtrthenpoke49605,2:sys49264,xa,ya
140 poke49634,0:gosub70:ifa$=chr$(134)thenmn=2:goto2280
150 fm=0:sys50088,0,192,"[204]inie:":gosub280
160 geta$:ifa$=""then160
170 ifa$="c"thenca=notca:goto150
180 ifa$="w"thengosub360:goto150
190 ifa$="l"thentr=nottr:goto150
200 ifa$="f"then110
210 ifa$="0"ora$="1"ora$="2"thenpa=val(a$):goto150
220 ifa$=chr$(134)ora$=chr$(133)then:gosub100:goto2270
230 ifa$="m"thenan=-1:ca=-1:ml=-1:tr=-1:fg=0:gosub100:goto510
240 ifa$="a"thengosub3390:goto140
250 ifa$=chr$(13)thengosub100:goto510
260 goto160
270 sys51115
280 a=ca:a$="[195][193]":gosub340:a=notca:a$="[195][197]":gosub340
290 a=tr:a$="[204][212]":gosub340:a=nottr:a$="[204][214]":gosub340
300 a=fg:a$="[198]ig":gosub340
310 a=ml:a$="[205][204]i":gosub340:a=wi:a$="[215]i":gosub340
320 a=0:a$="[193]ttr":gosub340
330 fori=0to2:a=(pa=i):a$=chr$(48+i):gosub340:next:return
340 poke49863,2:sys50107," "
350 poke49863,2-a:sys50107,a$:poke49863,2:return
360 xx=x:yy=y:x=240:y=192:poke49605,3:sys50088,x,y," "
370 gosub1560:x=xx:y=yy:poke49634,0
380 t=val(t$)*(NULL)/180:rx=cos(t):ry=-sin(t)
390 wi=(t<>0):return
400 printchr$(147)chr$(14)" [197][196][197][204][199][210][193][198]":print:print
420 print"1 [193]ltes [194]ild"
430 print"2 [206]eues [194]ild"
431 print"3 [205][195]-[210]outinen"
440 get a$:ifa$=""then440
450 ifa$="1"then 480
451 ifa$="3"thengosub12:goto400
460 if a$<>"2"then440
470 sys50906,1,0:sys50941
480 sys51090
485 cu=1:d=8:vf=1:hf=0:zs=2:zx=1:zy=1:px=1:py=1:bf=4
490 mn=2:ca=0:tr=-1:pa=1
500 x=160:y=96:poke49863,2:goto2270
510 gosub520:goto550
520 poke49605,3:ifnotluthend=8
530 poke49635,224:poke49636,192:poke49637,160:poke49638,16:poke49639,8
540 poke49640,4:poke49641,2:poke49642,1:poke49634,3:return
550 poke49605,3:poke49634,3:ifx<0thenx=0
560 ify<0theny=0
570 ifx>319thenx=319
580 ify>199theny=199
590 ifnotluthenoncugosub20,30,50
610 ifsthenonmngosub1030,2420,2420,2720,40,4380,5810
620 ifluthengosub3030
630 geta$:ifa$=""then630
640 ifsthenonmngosub1030,2420,2420,2720,40,4380,5810
660 ifnotluthenoncugosub20,30,50
670 ifa$=chr$(13)andfethen1020
680 fe=0:ifa$=""thenx=x+d:goto550
690 ifa$="[157]"thenx=x-d:goto550
700 ifa$="[145]"theny=y-d:goto550
710 ifa$=""theny=y+d:goto550
720 ifa$="[193]"then550
730 rem neu------
740 ifa$<>chr$(133)anda$<>chr$(134)then760
750 onmngoto130,2270,2430,2560,1520,4080,5830
760 ifa$=chr$(136)thens=nots:goto550
770 ifa$=chr$(13)then on mngoto840,2410,2410,2710,1490,4390,5820
780 ifa$=" "ora$="[160]"then820
790 ifa$=chr$(135)thenlu=notlu:ifnotluthensys51090
800 ifa$=chr$(140)thenx=xandnot7:y=yandnot7
801 ifa$=chr$(139)thencs=notcs
810 goto550
820 ifd=8thend=1:goto550
830 d=8:goto550
840 iffmthen910
850 ifmlandnotanthenca=0:wi=0
860 ifanthenan=0:xe=x:ye=y
870 poke49605,2:sys49264,x,y
880 fm=-1:xa=x:ya=y
890 ifmlandnotcathendx=xs-xe:dy=ys-ye:x=x+dx:y=y+dy
900 goto550
910 ifwithengosub1060:x=kx:y=ky
920 poke49605,2:sys49264,xa,ya:ifmlandcathenxs=x:ys=y
930 ifmlandnotcathen1130
940 sys50774,px,py:sys50873,vf,hf:poke49154,fa
950 fm=0:poke49605,pa:sys49415,xa,ya,x,y:poke49605,3:ifcathenx=xa:y=ya
960 sys50774,1,1:poke49154,0
970 iffgthenfe=-1
980 ifnottrthen880
990 goto550
1020 xa=xe:ya=ye:poke49605,2:sys49264,x,y:poke631,133:poke198,1:fg=0:goto920
1030 ifnotfmthenreturn
1040 kx=x:ky=y:ifnotwithen1100
1050 gosub1060:goto1100
1060 dx=x-xa:dy=y-ya:kx=dx*rx-dy*ry+xa:ky=dy*rx+dx*ry+ya:kx=int(kx+.5)
1070 ky=int(ky+.5):ifkx<0orky<0thenkx=xa:ky=ya
1080 ifkx>319orky>199thenkx=xa:ky=ya
1090 return
1100 poke49605,2:sys51454,xa,ya,kx,ky:iffgthengosub1270
1110 poke49605,3:return
1120 poke49605,2:sys51454,xa,ya,x,y:poke49605,3:return
1130 bx=xa-xe:by=ya-ye:ax=x-xs:ay=y-ys
1140 xa=xe:ya=ye:poke49605,3:ifluthensys51090
1150 gosub70:poke49634,0:sys50088,0,192,"[193]nzahl: [215]inkel: "
1160 x=64:y=192:gosub1560:n=val(t$):x=168:gosub370:gosub100:x=xs:y=ys
1170 poke49605,pa:n=int(n):ifn<1then1230
1180 sys50774,px,py:sys50873,vf,hf:poke49154,fa
1190 fori=1ton:xa=xa+bx:ya=ya+by:x=x+ax:y=y+ay:ifwithengosub1060:x=kx:y=ky
1200 ifx<0ory<0orxa<0orya<0orx>319orxa>319ory>199orya>199theni=n:goto1220
1210 sys49415,xa,ya,x,y
1220 next:sys50774,1,1:poke49154,0
1230 ml=0:wi=0:goto140
1240 fk=1:poke49605,3:goto550
1250 if(xa=xe)and(ya=ye)then1120
1260 poke49605,2
1270 ifxe<>xaorye<>yathensys51454,xe,ye,kx,ky
1280 return
1290 iffk<>5thenfk=5:goto870
1300 fk=1:poke49605,1:gosub1270:goto550
1310 ifnotfmthenreturn
1320 gosub1370:poke49605,2:sys49264,xa,ya
1330 sys51470,xa,ya,x,ky:poke49605,3:return
1340 ifnotfmthen860
1350 gosub1370:poke49605,2:sys49264,xa,ya:sys50774,px,py:sys50873,vf,hf
1351 poke49154,fa
1360 fm=0:poke49605,pa:sys51470,xa,ya,x,ky:sys50774,1,1:poke49154,0:goto550
1370 ky=y:ifqathenky=sgn(y-ya)*abs(x-xa)+ya:ifky<0orky>199thenky=ya
1380 return
1390 ifnotfmthenfm=-1:goto870
1400 poke49605,2:sys49264,xa,ya
1410 fm=0:if(abs(xa-x)and255)=0then550
1420 sys50774,px,py:sys50873,vf,hf:poke49154,fa
1430 poke49605,pa:sys51710,xa,ya,abs(xa-x)and255:poke49605,3:sys50774,1,1
1431 poke49154,0:goto550
1440 ifnotfmor((abs(x-xa)and255)=0)thenreturn
1441 poke49605,2:sys51710,xa,ya,abs(x-xa)and255:poke49605,3
1450 return
1460 poke49635,255:poke49642,255
1470 fori=49636to49641:pokei,129:next:return
1480 sys49264,256*peek(50020)+peek(50019),peek(50021):return
1490 sys50761,ri,dr:poke49634,ta:poke49863,zs:sys50774,zx,zy
1491 sys50873,vf,hf:poke49154,0:ifluthensys51090
1500 ifx<0ory<0orx>319ory>199then2880
1510 tx=-1:gosub1560:tx=0:poke49154,0
1520 ifa$=chr$(133)thengoto2880
1530 ifa$=chr$(134)thensys50761,0,0:goto2270
1540 ifyfthenx=x+dx:goto1500
1550 y=y-dy:goto1500
1560 poke49634,3:t$=""
1570 a=peek(50022):dd=8:ifa=3ora=0thendd=-dd
1580 yf=(aand1)=1:dy=dd*peek(49784)
1590 dx=dd*peek(49783)
1600 sys50088,x,y,t$
1610 gosub1460:gosub1480
1620 geta$:ifa$=""then1620
1630 gosub1480
1640 ifa$<>chr$(20)then1720
1650 ift$=""then1610
1660 a$=right$(t$,1):t$=left$(t$,len(t$)-1)
1670 xl=peek(50019):xh=peek(50020):yl=peek(50021)
1680 ifyfthenyl=yl+dy:goto1700
1690 kx=xl+256*xh+dx:xl=kxand255:xh=int(kx/256)
1700 gosub1710:sys50107,a$:gosub1710:goto1610
1710 poke50019,xl:poke50020,xh:poke50021,yl:return
1720 ifnot(a$=""ora$="[157]"ora$="[145]"ora$="")then1770
1730 sys50088,x,y,t$:ifa$=""thenx=x+1:goto1600
1740 ifa$="[157]"thenx=x-1:goto1600
1750 ifa$=""theny=y+1:goto1600
1760 y=y-1:goto1600
1770 ifa$=chr$(13)ora$=chr$(133)ora$=chr$(134)then1790
1780 sys50107,a$:t$=t$+a$:goto1610
1790 sys50088,x,y,t$
1791 ifa$<>chr$(13)thenreturn
1792 iftxthenpoke49154,fa
1800 poke49634,ta:sys50088,x,y,t$
1810 return
1820 ifnotfmthen870
1830 gosub1370:poke49605,2:sys49264,xa,ya
1840 fm=0:poke49605,ff:sys52569,xa,ya,x,ky:goto550
1850 sys49264,x,y:poke49605,2:sys51470,x,y,x+39,y+24:poke49605,3:return
1860 gosub1870:goto1940
1870 kx=(xandnot7)-16:ky=(yandnot7)-8
1880 ifkx<0thenkx=kx+8:goto1880
1890 ifkx>280thenkx=kx-8:goto1890
1900 ifky<0thenky=ky+8
1910 ifky>176thenky=ky-8
1920 sys39468,kx,ky:sys52750
1930 xc=x-kx:yc=y-ky:return
1940 poke49605,2
1950 ifxc<0thenxc=0
1960 ifyc<0thenyc=0
1970 ifxc>39thenxc=39
1980 ifyc>23thenyc=23
1990 ad=40*yc+xc+1024:z=peek(ad)
2000 pokead,z+2
2010 geta$:ifa$=""then2010
2020 pokead,z
2030 ifa$=""thenxc=xc+1:goto1950
2040 ifa$="[157]"thenxc=xc-1:goto1950
2050 ifa$="[145]"thenyc=yc-1:goto1950
2060 ifa$=""thenyc=yc+1:goto1950
2070 ifa$=chr$(13)thenx=kx+xc:y=ky+yc:sys51090:goto2270
2080 ifa$<>" "then1950
2090 z=peek(ad):pokead,(zand254)or((z+1)and1):sys49264,kx+xc,ky+yc:goto1950
2100 sys51090:sys52706:goto550
2110 sys49264,x,y:poke49605,2:sys51470,xa,ya,x,y:poke49605,3:return
2120 sys52883,xa,ya,x,y:poke49605,3:fm=1:goto550
2130 sys39936,xa,ya,x,y:poke49605,3:fm=1:goto550
2140 dz=dz-8:az=az-1
2150 x=xandnot7:y=yandnot7:kx=x+dz:ky=y+dz
2160 ifkx>319orky>199then2140
2170 poke49605,2:sys51470,x,y,kx,ky:poke49605,3:return
2180 gosub2150
2190 ifluthengosub3030
2200 geta$:ifa$=""then2200
2210 gosub2150
2220 ifa$=""thenaz=az+1:dz=dz+8:goto2180
2230 if(a$=""ora$="[157]")andaz<>0thenaz=az-1:dz=dz-8:goto2180
2240 ifa$=chr$(13)thensys51090:sys40386,x,y,az:xa=x:ya=y:x=kx:y=ky:goto2760
2250 ifa$=chr$(133)ora$=chr$(134)thencu=1:goto740
2260 goto2180
2270 mn=2:fm=0:gosub70:cu=1
2280 sys50088,0,192,"[208]kt [204]in [210]-[197]ck [203]r [194]lock [207]bj [212]ext [198]uell [211]o"
2290 geta$:ifa$=""then2290
2300 ifa$="l"thengosub100:mn=1:goto140
2310 ifa$="k"thenmn=3:fk=1:mn$="[203]reis:":gosub100:goto2450
2320 ifa$="r"thenmn=3:fk=2:mn$="[210]echteck:":gosub100:goto2450
2330 ifa$="b"thengosub100:goto2580
2340 ifa$="t"thengosub100:goto2880
2350 ifa$="p"thenfk=3:gosub100:goto510
2360 ifa$="f"thenfk=4:gosub100:goto510
2370 ifa$="s"thengosub100:goto3640
2380 ifa$="o"thengosub100:goto4120
2390 goto2290
2400 sys50873,vf,hf:poke49154,fa:sys50524,x,y:poke49154,0:goto550
2410 onfkgoto1390,1340,1860,2400
2420 onfkgoto1440,1310,40,40
2430 iffmthenpoke49605,2:sys49264,xa,ya:fm=0
2440 ifa$=chr$(134)thengoto2270
2450 poke49634,0:gosub70
2460 sys50088,0,192,mn$:gosub320
2470 iffk=2thena=qa:a$="[209]uadrat":gosub340
2480 geta$:ifa$=""then2480
2490 ifa$="0"ora$="1"ora$="2"thenpa=val(a$):goto2460
2500 ifa$=chr$(133)ora$=chr$(134)thengosub100:goto2270
2510 iffk=1then 2530
2520 ifa$="q"thenqa=notqa:goto2460
2530 ifa$="a"thengosub3390:goto2450
2540 ifa$<>chr$(13)then2460
2550 gosub100:goto510
2560 iffmthenpoke49605,2:sys49264,xa,ya:fm=0
2570 ifa$=chr$(134)thengoto2270
2580 mn=4:gosub70:poke49634,0:cu=1
2590 sys50088,0,192,"[194]lock: [209]uadr [204]oesch [198]uell [201]nv [196]reh [211]pieg"
2600 sys50088,48,192,"":a=qa:a$="[209]uadr":gosub340
2610 geta$:ifa$=""then2610
2620 ifa$="q"thenqa=notqa:goto2600
2630 ifa$="l"thenff=0:goto2700
2640 ifa$="f"thenff=1:goto2700
2650 ifa$="i"thenff=2:goto2700
2660 ifa$=chr$(133)ora$=chr$(134)thengosub100:goto2270
2670 ifa$="d"thenfk=2:az=0:dz=7:d=8:gosub100:cu=2:goto510
2680 ifa$="s"thenfk=3:gosub100:goto510
2690 goto2600
2700 fk=1:gosub100:goto510
2710 onfkgoto1820,2180,2730
2720 onfkgoto1310,2150,1310
2730 ifnotfmthen870
2740 ifluthensys51090
2750 gosub1370:poke49605,2:sys49264,xa,ya
2760 poke49605,2:gosub1330
2770 gosub70:poke49634,0
2780 sys50088,0,192,"[211]piegeln: [204]i/[210]e [207]b/[213]nt "
2790 ifcu=2thensys50107,"[196]rehen"
2800 geta$:ifa$=""then2800
2810 if a$="l"thengosub2860:sys39936,xa,ya,x,ky:goto2760
2820 if a$="o"thengosub2860:sys52883,xa,ya,x,ky:goto2760
2830 if (a$="d"ora$=chr$(13))andcu=2thengosub2860:sys40386,xa,ya,az:goto2760
2840 ifa$=chr$(133)ora$=chr$(134)then2870
2850 goto2800
2860 gosub100:poke49605,2:gosub1330:goto70
2870 gosub100:poke49605,2:gosub1330:fm=0:cu=1:goto2560
2880 mn=5:poke49634,0:poke49863,2:gosub70
2890 sys50761,0,0
2900 sys50088,0,192,"[212]ext: [193]ttr 0 1 2 3 [210]ichtung [196]rehung [193]"
2910 poke49863,3:sys50088,(11+ta+ta)*8,192,chr$(ta+48)
2920 sys50761,0,(ri+3)and3:sys50088,224,192,"^"
2930 sys50761,0,dr:sys50088,304,192,"[193]"
2940 poke49863,2:sys50761,0,0
2950 geta$:ifa$=""then2950
2960 ifa$="r"thenri=(ri-1)and3:goto2890
2970 ifa$="d"thendr=(dr-1)and3:goto2890
2980 ifa$>="0"anda$<"4"thenta=val(a$):goto2890
2990 ifa$=chr$(13)thengosub100:goto510
3000 ifa$=chr$(133)ora$=chr$(134)thensys50761,0,0:gosub100:goto2270
3010 ifa$="a"thengosub3390:goto2880
3020 goto2950
3030 gosub1870
3040 ad=40*yc+xc+1024:z=peek(ad)
3050 pokead,z+2:return
3060 geta$:ifa$=""then3060
3070 a=val(a$):ifa<1ora>2then3060
3080 return
3090 a=(a+1)and1:q=53248+1024*a:poke49605,2
3100 za=57344+4*320+80:ya=31:xa=79
3110 forj=1to2:zl=za:fori=1to4:z=zl:sys51470,xa,ya,xa+33,ya+33:fork=1to4
3120 sys52259,z,q,32,0:q=q+32:z=z+320:next
3130 xa=xa+40:zl=zl+40:next:xa=79:za=za+320*5:ya=ya+40:next
3140 return
3150 gosub70
3160 poke49634,0:sys50088,0,192,"[199]rafik: [211]i [200]o [215]e [204]oe [218]satz: [197]dit [193]ktiv"
3170 geta$:ifa$=""then3170
3180 ifa$="s"thengosub100:sys50990:goto3150
3190 ifa$="h"thengosub100:sys51002:goto3150
3200 ifa$="w"thengosub100:sys51063:goto3150
3210 ifa$="l"thengosub100:sys50906,1,0:sys50941:goto3150
3220 ifa$="e"thengosub3270:gosub3280:gosub3310:goto3150
3230 ifa$="a"thengosub3270:gosub3060:gosub100:gosub3090:goto3150
3240 ifa$=chr$(133)thengosub100:goto3640
3250 ifa$=chr$(134)then2280
3260 goto3170
3270 poke49863,3:sys50088,224,192,"?":poke49863,2:return
3280 geta$:ifa$=""then3280
3290 a=val(a$):ifa<0ora>7then3280
3300 return
3310 ifa<4thenro=1:q=53248+1024*(aand6)
3320 ifa>3thenro=0:q=53248+1024*int((aand3)/2)
3330 sys50906,1,0:sys50941:poke49605,2
3340 za=57344+4*320+80:ya=31:xa=79
3350 forj=1to2:zl=za:fori=1to4:z=zl:sys51470,xa,ya,xa+33,ya+33:fork=1to4
3360 sys52259,q,z,32,ro:q=q+32:z=z+320:next
3370 xa=xa+40:zl=zl+40:next:xa=79:za=za+320*5:ya=ya+40:next
3380 return
3390 gosub100:printchr$(147):sys51115:gf=0:printchr$(14)
3400 printchr$(147)
3410 print" [214]ordergrundfarbe : "vf
3420 print" [200]intergrundfarbe : "hf
3430 print" [198]arbattribut : "fa
3440 print" [199]lobale [198]arbe":print
3450 print" [208]unktgroesse : "px;","py
3460 print" [194]uchstabengroesse: "zx;","zy:print
3470 print" [218]eichensatz : "zs:print
3500 geta$:ifa$=""then3500
3510 ifa$="v"thenyk=1:gosub3630:inputvf:goto3400
3520 ifa$="h"thenyk=2:gosub3630:inputhf:goto3400
3530 ifa$="f"thenyk=3:gosub3630:inputfa:goto3400
3540 ifa$="g"thengf=-1:goto3400
3550 ifa$="p"thenyk=6:gosub3630:inputpx,py:goto3400
3560 ifa$="b"thenyk=7:gosub3630:inputzx,zy:goto3400
3570 ifa$=chr$(13)then3610
3580 ifa$="z"thenyk=9:gosub3630:inputzs:goto3400
3590 ifa$="c"thencs=notcs:goto3400
3600 goto3500
3610 sys51090:ifgfthensys50906,vf,hf
3620 goto70
3630 poke782,20:poke781,yk:poke783,peek(783)and254:sys65520:return
3640 gosub70
3650 sys50088,0,192,"[211]peicher [198]loppy [196]ruck [205]uster [195]olor [193]ttr":cu=1
3660 geta$:ifa$=""then3660
3670 ifa$="s"then3160
3680 ifa$="f"then3740
3690 ifa$="m"thengosub100:goto5280
3700 ifa$="a"thengosub3390:goto3650
3701 ifa$="d"thengosub100:goto3731
3710 ifa$="c"thenmn=7:cu=2:gosub1460:gosub100:goto550
3720 ifa$=chr$(133)ora$=chr$(134)thengosub100:goto2270
3730 goto3660
3731 gosub70:sys50088,0,192,"[196]ruck: [196]rucken [212]reiber "
3732 geta$:ifa$=""then3732
3733 ifa$="d"thengosub100:sys39168:goto3640
3734 ifa$=chr$(134)thengosub100:goto2270
3735 ifa$<>"t"thengosub100:goto3640
3736 xx=x:yy=y:y=192:x=184:gosub1560
3737 x=xx:y=yy:sys51991,8,t$,39168,1:sys65484:close8:gosub100:goto3731
3740 b=-1:gr=-1:c=-1
3750 sys50088,0,192,""
3760 a=b:a$="[204]aden":gosub350:a=notb:a$="[211]peichern":gosub340
3770 sys50107," [199]rafik:":ifnotgrthensys50107," [207][198] [205][198]":goto3790
3780 a=c:a$="[207][198]":gosub340:a=notc:a$="[205][198]":gosub340
3790 sys50107," [218]satz:":ifgrthensys50107," 1 2":goto3810
3800 a=c:a$="1":gosub340:a=notc:a$="2":gosub340
3810 geta$:ifa$=""then3810
3820 ifa$="l"thenb=-1:goto3750
3830 ifa$="s"thenb=0:goto3750
3840 ifa$="o"thenc=-1:gr=-1:goto3750
3850 ifa$="m"thenc=0:gr=-1:goto3750
3860 ifa$="1"thenc=-1:gr=0:goto3750
3870 ifa$="2"thenc=0:gr=0:goto3750
3880 ifa$=chr$(133)thengosub100:goto3640
3890 ifa$=chr$(134)thengoto2280
3900 ifa$<>chr$(13)then3810
3910 gosub100:gosub70:sys50088,0,192,""
3920 a$="[211]peichern ":ifbthena$="[204]aden "
3930 sys50107,a$:a$="[218]eichensatz ":ifgrthena$="[199]rafik ":sys50107,a$:goto3960
3940 sys50107,a$:a$="2":ifcthena$="1"
3950 goto3970
3960 a$="[205][198]":ifcthena$="[207][198]"
3970 sys50107,a$+":"
3980 xx=x:yy=y:x=256*peek(50020)+peek(50019):y=peek(50021)
3990 sys50107," "
4000 poke49605,3:gosub1560:x=xx:y=yy
4010 gosub100:n=-gr-gr-b+1
4020 onngosub4040,4050,4060,4070
4030 sys65484:close8:gosub70:goto3750
4040 sys52122,8,t$+",p,w",54272+c*1024,4:return
4050 sys51991,8,t$,54272+c*1024,4:return
4060 sys52162,8,t$+",p,w",1+c,0:return
4070 sys52030,8,t$,1+c,0:return
4080 ifa$<>chr$(133)then4110
4090 iffk<4then4120
4100 goto4560
4110 goto2270
4120 fm=0:gosub70:sys50088,0,192,"[207]bjekt: [205]ark [215]ahl [194]ew [203]op [199]raf-[215]e [193]ufn [204]":mn=6
4130 cu=1
4140 geta$:ifa$=""then4140
4150 ifa$="m"thenan=-1:fk=1:qa=0:gosub100:goto510
4160 ifa$="k"thengosub100:goto4560
4170 ifa$="g"then4240
4180 ifa$="b"thengosub4250:fk=3:gosub100:goto510
4190 ifa$="a"then4970
4200 ifa$="w"then5030
4210 ifa$="l"then5100
4220 ifa$=chr$(133)ora$=chr$(134)thengosub100:goto2270
4230 goto4140
4240 gosub100:sys51063:poke40959,peek(40959)+64*sgn(200-peek(40959)):goto4120
4250 ifpeek(40959)<>224thencu=3
4260 return
4270 ifnotfmthen860
4280 poke49605,2:sys49264,xa,ya:sys52569,xa,ya,x,y
4290 fk=2:xs=x:ys=y:x=xe:y=ye:goto550
4300 gosub4440:ifauthen550
4310 a=-(peek(40959)=224):sys52948,x,y,a,0:fori=0to5
4320 poke40753+i,peek(53002+i):next:poke40959,224:goto4120
4330 gosub4440:ifauthen550
4340 xe=x:ye=y:sys52948,x,y,0,oa:fk=6:goto550
4350 sys52948,x,y,0,1:goto550
4360 gosub4440:ifnotauthensys52948,x,y,0,oa
4370 goto550
4380 onfkgoto1310,40,4400,4400,4400,4400,40
4390 onfkgoto4270,4480,4300,4360,4330,4880,5120
4400 gosub4440:ifauthenoncu-lugoto40,40,20,40
4410 ifpeek(40959)<>224thensys52948,x,y,0,3:return
4420 poke49605,2
4430 sys51470,xx,yy,kx,ky:poke49605,3:return
4440 xx=x-peek(40759):yy=y-peek(40760)
4450 kx=xx+256*(peek(40757)-peek(40754))+peek(40756)-peek(40753)
4460 ky=yy+peek(40758)-peek(40755)
4470 au=xx<0oryy<0orkx>319orky>199:return
4480 ifxe>xsthena=xe:xe=xs:xs=a
4490 ifye>ysthena=ye:ye=ys:ys=a
4500 ifx<xeorx>xsor(x-xe)>255then550
4510 ify<yeory>ysthen550
4520 poke49605,2:sys52569,xe,ye,xs,ys
4530 poke40753,xeand255:poke40754,int(xe/256):poke40755,ye
4540 poke40756,xsand255:poke40757,int(xs/256):poke40758,ys
4550 poke40759,x-xe:poke40760,y-ye:poke40959,224:goto4120
4560 gosub70:ifpeek(40959)<>224thencu=3
4570 poke49634,0
4580 sys50088,0,192,"[203]opie:":fori=0to3:a=(oa=i):a$=chr$(48+i):gosub340:next
4590 sys50107," [205][203] [206]eb [201]nv [196]r [204][210] [207][213]"
4600 geta$:ifa$=""then4600
4610 ifa$="i"then4720
4620 ifa$="l"then4740
4630 ifa$="o"then4770
4640 ifa$=chr$(13)thengosub100:fk=4:goto510
4650 ifa$="d"then4800
4660 ifa$="m"thengosub100:fk=5:goto510
4670 ifa$="n"thencu=1:gosub100:fk=7:goto510
4680 ifa$>="0"anda$<"4"thenoa=val(a$):goto4570
4690 ifa$=chr$(133)thengosub100:goto4120
4700 ifa$=chr$(134)thengosub100:goto2270
4710 goto4600
4720 ifpeek(40959)<>224then4600
4730 gosub100:gosub4940:poke49605,2:sys52569,xe,ye,xs,ys:goto4560
4740 ifpeek(40959)<>224then4600
4750 gosub100:gosub4940:sys39936,xe,ye,xs,ys
4760 poke40759,xs-xe-dx:goto4560
4770 ifpeek(40959)<>224then4600
4780 gosub100:gosub4940:sys52883,xe,ye,xs,ys
4790 poke40760,ys-ye-dy:goto4560
4800 ifpeek(40959)<>224then4600
4810 gosub100:gosub4940:a=int((xs-xe)/8):b=int((ys-ye)/8)
4811 if((yeandnot7)+xs-xe)>199then4560
4820 ifb>athena=b
4830 xe=xeandnot7:ye=yeandnot7
4840 sys52948,xe+dx,ye+dy,1,0:fori=0to2:poke40753+i,peek(53002+i):next
4850 xs=xe+a*8+7:ys=ye+a*8+7
4860 poke40758,ys:poke40756,xsand255:poke40757,int(xs/256)
4870 sys40386,xe,ye,a:a=dx:dx=xs-xe-dy:dy=a:poke40759,dx:poke40760,dy:goto4560
4880 gosub4440:ifauthen550
4890 gosub70:sys50088,0,192,"[193]nzahl: "
4900 xx=x:yy=y:x=64:y=192:gosub1560:az=val(t$):x=xx:y=yy:gosub100
4910 dx=x-xe:dy=y-ye:fori=1toaz:gosub4440:ifauttheni=az:goto4930
4920 sys52948,x,y,0,oa:x=x+dx:y=y+dy
4930 next:x=xe:y=ye:goto4560
4940 xe=256*peek(40754)+peek(40753):ye=peek(40755)
4950 xs=256*peek(40757)+peek(40756):ys=peek(40758)
4960 dx=peek(40759):dy=peek(40760):return
4970 poke49634,0:poke49863,3:sys50088,312,192," "
4980 geta$:ifa$=""then4980
4990 sys50088,312,192,a$
5000 poke780,asc(a$):sys49989:ad=54272+8*peek(780)
5010 fori=0to7:sys51238,ad+i,peek(40753+i):next
5020 poke49863,2:gosub100:goto4120
5030 gosub100:sys51063:gosub70:sys50088,0,192,"[215]ahl: "
5040 poke49863,3:sys50107," "
5050 geta$:ifa$=""then5050
5060 sys50088,48,192,a$
5070 poke780,asc(a$):sys49989:ad=54272+8*peek(780)
5080 fori=0to7:sys52386,ad+i,a:poke40753+i,a:next:poke40959,224
5090 poke49863,2:goto4240
5100 ifpeek(40959)<>224then4140
5110 gosub100:gosub4940:poke49605,0:sys52569,xe,ye,xs,ys:goto4120
5120 t$="":x1=x:y1=y
5130 sys50088,x,y,"[165]"
5140 geta$:ifa$=""then5140
5150 sys50088,x,y,"[165]"
5160 ifa$<>chr$(20)then5200
5170 ift$=""then5130
5180 a$=right$(t$,1):t$=left$(t$,len(t$)-1)
5190 gosub5250:gosub5270:x=x-dx-1:sys52948,x,y,0,3:goto5130
5200 ifa$=chr$(13)ora$=chr$(133)thenx=x1:y=y1:goto4560
5210 ifa$=chr$(134)thenx=x1:y=y1:goto2270
5230 gosub5250:gosub4440:ifauthen5130
5231 t$=t$+a$
5240 sys52948,x,y,0,oa:gosub5270:x=x+dx+1:goto5130
5250 poke780,asc(a$):sys49989:ad=54272+8*peek(780)
5260 fori=0to7:sys52386,ad+i,a:poke40753+i,a:next:poke40959,160:return
5270 dx=256*(peek(40757)-peek(40754))+peek(40756)-peek(40753):return
5280 gosub70
5290 sys50088,0,192,"[205]uster: [211]etzen [215]ahl: [194]lock [218]eichen"
5300 geta$:ifa$=""then5300
5310 ifa$="b"then5390
5320 ifa$="z"then5620
5330 ifa$="s"then5370
5340 ifa$=chr$(133)thengosub100:goto3640
5350 ifa$=chr$(134)thengosub100:goto2270
5360 goto5300
5370 gosub100:ifmfthensys51303,bm:goto5280
5380 poke49863,zf:sys51179,zc:poke49863,2:goto5280
5390 gosub100:sys50990:poke49605,1:sys50941
5400 sys50088,0,192,"[194]lockfuellmuster (4-7): "
5410 poke49863,3:sys50088,192,192,chr$(bf+48):poke49863,2
5420 ro=0:a=bfand3:q=53248+1024*int(a/2):gosub3340
5430 ifbfand1thensys50906,0,1:goto5450
5440 sys50906,1,0
5450 geta$:ifa$=""then5450
5460 ifa$=chr$(133)thensys51002:gosub70:goto5290
5470 ifa$=chr$(134)thensys51002:goto2270
5480 ifa$=chr$(13)thengosub5500:bm=8*(bfand3)+4*z+sp:sys51002:mf=-1:goto2270
5490 bf=(asc(a$)and3)+4:goto5400
5500 z=0:sp=0
5510 gosub5600
5520 geta$:ifa$=""then5520
5530 gosub5600
5540 ifa$=""thensp=sp+1:ifsp>3thensp=3
5550 ifa$="[157]"thensp=sp-1:ifsp<0thensp=0
5560 ifa$=""thenz=z+1:ifz>3thenz=3
5570 ifa$="[145]"thenz=z-1:ifz<0thenz=0
5580 ifa$=chr$(13)thenreturn
5590 goto5510
5600 xx=80+40*sp:yy=32+40*z:poke49605,2
5610 sys52569,xx+8,yy+8,xx+23,yy+23:return
5620 gosub100:sys50990:poke49605,1:a=zf
5630 gosub3310:zf=a:sys50088,0,192,"[218]eichenfuellmuster (0-7): "
5640 poke49863,3:sys50088,208,192,chr$(zf+48):poke49863,2
5650 ifaand1thensys50906,0,1:goto5660
5660 geta$:ifa$=""then5660
5670 ifa$=chr$(133)ora$=chr$(134)then5460
5680 ifa$<>chr$(13)thena=val(a$)and7:goto5630
5690 gosub5500:zc=64*z+16*sp:sys50774,1,1
5700 z=0:sp=0
5710 gosub5800
5720 geta$:ifa$=""then5720
5730 gosub5800
5740 ifa$=""thensp=sp+1:ifsp>3thensp=3
5750 ifa$="[157]"thensp=sp-1:ifsp<0thensp=0
5760 ifa$=""thenz=z+1:ifz>3thenz=3
5770 ifa$="[145]"thenz=z-1:ifz<0thenz=0
5780 ifa$=chr$(13)thenzc=zc+4*z+sp:sys51002:mf=0:goto2270
5790 goto5710
5800 poke49605,2:sys52569,xx+8*sp,yy+8*z,xx+8*sp+7,yy+8*z+7:return
5810 sys49264,xandnot7,yandnot7:return
5820 sys50873,vf,hf:poke49154,fa:sys51075,x,y:poke49154,0:goto550
5830 cu=1:gosub520:ifa$=chr$(133)then3640
5840 goto2270