home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
64'er 1990 November
/
64er_Magazin_90-11_1990_Markt__Technik_de_Side_A.d64
/
plaprog
(
.txt
)
< prev
next >
Wrap
Commodore BASIC
|
2022-10-26
|
5KB
|
130 lines
1 w$="@c&rn@@@@---------------------------------@@@@@-------------------------"
2 w$=w$+"--------@@@@@----------------------------------"
3 dimka%(400),a%(400),na$(400),za$(400),ze$(400),ha$(400),ar$(400),h%(30)
4 open1,8,0,"platte,u":input#1,fi,ka:dimpl$(200),pl%(200):ifka=0goto8
5 fora=1toka:print""a:input#1,pl$(a),pl%(a):next
6 fora=1tofi:print""a
7 input#1,ka%(a),a%(a),na$(a),za$(a),ze$(a),ha$(a),ar$(a):next
8 close1:_c0,6
9 lo=ka-21*int(ka/21):hi=ka-lo:iflo=0thenhi=hi-21:ifhi<0thenhi=0
10 _w"z@lbl[193]nsehen@[211]ortieren@[211]peichern@"
11 _w"zglal[214]or@[218]urueck@"
12 _w"zmlcl[196]rucken@-nur [212]it.@-nur [208]la.@-nach [208]la.@":_w"ztlak[212]itel @[208]latten@"
13 _w"@@xuo":_p34,21:print"[151]"fi;:_p34,22:printka"[155]"
14 _p0,1:fora=1to21:print" "pl$(sa+a):next
15 _m:wait2,1:if_y=0or_y>22or_x=25or(_x>24and_y>17)goto15
16 if_x<25goto24
17 if(_y>3and_y<8)or(_y>9and_y<14)goto15
18 a=_y+4*(_y>6)+5*(_y>12)
19 onagoto88,68,79,22,20,113,121,124:goto15
20 ifsa>20thensa=sa-21:goto13
21 sa=hi:goto13
22 ifsa<hithensa=sa+21:goto13
23 sa=0:goto13
24 ifka=0thengosub55:ifna$=""goto8
25 ifka=0thenka=1:k=1021:pl%(1)=k:pl$(1)=na$:k1=1:goto31
26 if_y<>22thenk1=sa+_y:k=pl%(k1):if(sa<hi)or(_y<lo+1)or(lo=0)goto31
27 gosub55:ifna$=""goto8
28 k=pl%(1+_f(pl%(1),pl%(ka)))-1:ka=ka+1:k1=ka:pl$(ka)=na$:pl%(ka)=k:ifk>4goto31
29 fora=1toka:k=pl%(a):pl%(a)=1022-a:forb=1tofi:ifint(a%(b)/32)=kthenka%(b)=pl%(a)
30 next:next:fora=1tofi:a%(a)=32*ka%(a)+(a%(a)and31):next:goto28
31 _c0,6
32 h%(0)=0:c=0:fora=1tofi:ifka%(a)=kthenh%(c)=a:c=c+1
33 next
34 _w"@a$@l[197]xit [196]rucken@":_w"@c$rl":_p14,2:print"[152]"pl$(k1)
35 ifc<2goto38
36 fora=0toc-2:forb=a+1toc-1:ifa%(h%(a))>a%(h%(b))then:_sh%(a),h%(b)
37 next:next
38 fora=0toc-1:_p1,4+a:print""na$(h%(a)):next
39 _m:wait2,1:if_y=2and_x<5goto8
40 if_y=2and_x<12goto66
41 if_y=2thengosub56:ifna$=""goto57
42 if_y=2thenpl$(k1)=na$
43 if_y<4goto39
44 if(c>18)and(_y>22)goto39
45 _w"@b&dn[212]itel@[201]nterpr.@[218]eit@[218]aehler@[194]em.@":fl=0
46 ifc=0thene=1+32*k:d=fi+1:fl=1:goto49
47 if_y-4<cthenif_y>3thend=h%(_y-4):e=a%(d):goto49
48 e=a%(h%(c-1))+1:d=fi+1:fl=1
49 _p9,3:print"[154]"na$(d):printtab(9)""ha$(d):printtab(9)""ze$(d)
50 printtab(9)""za$(d):printtab(9)""ar$(d)
51 _e9,3,37,7:na$=""+_i(3,9,37):iffl=1thenifna$=""goto34
52 ifna$=""thengosub61:goto31
53 a%(d)=e:ka%(d)=k:na$(d)=na$:ha$(d)=""+_i(4,9,37):ze$(d)=""+_i(5,9,19)
54 ar$(d)=""+_i(7,9,37):za$(d)=""+_i(6,9,19):fi=fi-(fl=1):goto32
55 _c0,6:_w"@a$@l":_w"@c$rl"
56 _e14,2,35,2:na$=""+_i(2,14,35):return
57 _spl$(ka),pl$(k1):_spl%(ka),pl%(k1):pl$(ka)="":ka=ka-1:d=1
58 ifka%(d)=kthengosub61:d=d-1
59 d=d+1:ifd<=figoto58
60 goto8
61 na$(d)="":ar$(d)="":za$(d)="":ze$(d)="":ha$(d)="":ka%(d)=0
62 _sna$(d),na$(fi):_sha$(d),ha$(fi):_sar$(d),ar$(fi):_sze$(d),ze$(fi)
63 _sza$(d),za$(fi):_sa%(d),a%(fi):_ska%(d),ka%(fi):fi=fi-1
64 fora=1tofi:ifka%(a)=kthenif(a%(a)and31)>dthena%(a)=a%(a)-1
65 next:return
66 fl=c:gosub111:_u1:print#1,pl$(k1):gosub117:forb=0tofl-1:a=h%(b)
67 gosub119:next:_u0:close1:c=fl:goto31
68 fora=1toka-1:b=a+abs(_f(pl$(a),pl$(ka+2))):_spl%(a),pl%(b):_spl$(a),pl$(b):next
69 _w"kgl@c[197]xit@":_w"kilcc[210]eihenfolge@[206]ame@[201]nterpret@[194]emerkung@":iffi<2goto9
70 _m:wait2,1:if(_y<8)or(_y=9)or(_y>13)goto70
71 if_y=8goto8
72 poke55307+40*_y,9:on_y-9goto73,74,75,76
73 fora=1tofi-1:b=a+_f(a%(a),a%(fi)):gosub77:next:goto8
74 fora=1tofi-1:b=a+abs(_f(na$(a),na$(fi))):gosub77:next:goto8
75 fora=1tofi-1:b=a+abs(_f(ha$(a),ha$(fi))):gosub77:next:goto8
76 fora=1tofi-1:b=a+abs(_f(ar$(a),ar$(fi))):gosub77:next:goto8
77 _sa%(a),a%(b):_ska%(a),ka%(b):_sha$(a),ha$(b):_sar$(a),ar$(b)
78 _sna$(a),na$(b):_sza$(a),za$(b):_sze$(a),ze$(b):return
79 open1,8,5,"hilfe.platt,u,w":print#1,fi:print#1,ka
80 fora=1toka:print""a:print#1,chr$(34)pl$(a):print#1,pl%(a):next
81 fora=1tofi:print""a:print#1,ka%(a):print#1,a%(a):print#1,chr$(34)na$(a)
82 print#1,chr$(34)za$(a):print#1,chr$(34)ze$(a):print#1,chr$(34)ha$(a):print#1,chr$(34)ar$(a)
83 next:close1:print" ":open1,8,15:input#1,a,b$,c,d:ifa>1thengosub87
84 print#1,"s:platte,u":input#1,a,b$,c,d:ifa>1thengosub87
85 print#1,"r:platte=hilfe.platt":input#1,a,b$,c,d:ifa>1thengosub87
86 close1:goto8
87 _w"cezbk[196]iskettenfehler@":_p4,7:print"[151]"a,c,d;:_p4,8:printb$:_m:wait2,1:return
88 s=0
89 _c0,6:_w"@@s@l[197]xit [214]or [218]urueck@":sm=fi-(fiand3)
90 if(fiand3)=0thensm=sm+4*(sm>0)
91 _ww$:_p0,4:print"[154]";
92 fora=1to4:print" "na$(a+s):print" "ha$(a+s)
93 print_t(" "+za$(a+s),12)ze$(a+s):print" "ar$(a+s):print:next
94 _m:wait2,1:if_y=0or_y=2or_y=3or_y=24goto94
95 if_y>2then101
96 if_x<7then8
97 if_x>11thenifs>3thens=s-4:goto91
98 if_x>11thens=sm:goto91
99 ifs<smthens=s+4:goto91
100 s=0:goto91
101 a=int((_y+1)/5):k=ka%(s+a):ifk=0goto94
102 fora=1toka:ifpl%(a)=kthenk1=a
103 next:goto31
104 _w"@huai[212]rennzeilen j n@[203]opf wiederholen j n@"
105 _w"@kuai[197]xit@[196]rucken@"
106 poke55674+2*tf,7:poke55714+2*kf,7:_m:wait2,1
107 if_y=9thentf=-(_x=20):goto104
108 if_y=10thenkf=-(_x=20):goto104
109 if_y=12goto8
110 if_y<>13goto106
111 open1,4,7:close1:ifst<>0then:_w"@@t@i[196]rucker einschalten@":_m:wait2,1:goto111
112 open1,4,7:print#1,"@"chr$(126)"3[210]";:return
113 gosub104:_u1:c=2:gosub117
114 fora=1tofi:gosub119:ifc>53thenprint#1,chr$(12);:c=0:ifkf=0thengosub117
115 ifka%(a)<>ka%(a+1)theniftf=0thenprint#1:c=c+1
116 next:print#1:close1:_u0:goto8
117 print#1,_t("[201]nterpret",31)_t("[212]itel",31)_t("[194]emerkung",31)_t("[218]eit",15);
118 print#1,"[195]ount":c=2:return
119 print#1,_t(ha$(a),31)_t(na$(a),31)_t(ar$(a),31);
120 print#1,_t(za$(a),13)_t(ze$(a),13):c=c+1:return
121 gosub111:_u1:c=0:fora=1tokastep4:forb=0to3:print#1,_t(pl$(a+b),30);:next:c=c+1
122 ifc=53thenprint#1,chr$(12);:c=0
123 print#1:next:print#1:close1:_u0:goto8
124 gosub104:_u1:gosub117
125 forb=1toka:print#1,pl$(b):c=c+1:ifc>53thenprint#1,chr$(12);:c=0:ifkf=0thengosub117
126 k=pl%(b):fora=1tofi:ifka%(a)=kthengosub119
127 ifc>53thenprint#1:c=0:ifkf=0thengosub117
128 next:next:_u0:close1:goto9
0