home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
64'er
/
64ER_CD.iso
/
sh3x
/
sh37d.d64
/
sprite-ed
(
.txt
)
< prev
next >
Wrap
Commodore BASIC
|
1995-03-30
|
12KB
|
448 lines
0 REM ...............................
1 REM . .
2 REM . S P R I T E A I D + .
3 REM . .
4 REM . WRITTEN BY ANDREAS KOELBACH .
5 REM . STADTWALDSTR. 5 .
6 REM . 3550 MARBURG/L. .
7 REM . .
8 REM ...............................
9 PRINT CHR$(142)
10 V=53248:IFPEEK(53280)<>246THENPOKE53280,6:GOSUB345
11 CD$=""
12 F=55296:C=33792:SN=32768:A=0:O$=" "
13 FORI=0TO7:POKE53287+I,7:POKEC+1016+I,I:NEXT
14 POKE650,128:POKEV+28,0:POKEV+23,0:POKEV+29,0
15 DEFFNA(A)=A+X+Y*40
16 GOSUB24
17 POKEV+33,6:PRINT"[147].SPRITEAID+.[154]"
18 PRINT" 8 6 4 [146]"
19 FORI=1TO20STEP2
20 PRINT" [146]........................ [146]"
21 PRINT" -[146]........................-[146]":NEXT
22 PRINT" [146]........................ [146]"
23 PRINT" 8 6 4 [146]":GOSUB172:GOTO68
24 POKEV+21,0:FORI=0TO7:S(I)=1:SN$(I)=".":NEXT:RETURN
25 REM******* CALCULATE DOT ***********
26 CA=X-14:CB=Y-2:H=INT(CA/8):BY=SN+3*CB+H:BI=2^(7-CA+H*8)
27 IFZL=46THENPOKEBY,PEEK(BY)AND255-BI:RETURN
28 POKEBY,PEEK(BY)ORBI:RETURN
29 REM ******** GET SUBROUTINE *********
30 POKE204,0:POKE198,0:WAIT198,1:GETA$:A=ASC(A$)
31 IFPEEK(207)THEN31
32 POKE204,1:RETURN
33 POKE198,0:WAIT198,1:GETA$:A=ASC(A$):RETURN
34 REM ********* REPRODUCTION **********
35 PRINT""TAB(13)"[144]- REPRO -[154]":CA=0:BI=0
36 FORBY=SNTOSN+62:B=PEEK(BY):FORI=7TO0STEP-1:CA=CA+1
37 IFBAND2^ITHENPOKEC+93+CA,42:GOTO39
38 POKEC+93+CA,46:GETA$:IFA$<>""THENI=0:BY=SN+62
39 NEXTI:BI=BI+1:IFBI=3THENBI=0:CA=CA+16
40 NEXTBY:RETURN
41 REM ********* MULTIMATRIX ***********
42 A=0:GOTO44
43 A=14
44 IFMF(S)=0THENRETURN
45 FORI=55389TO56213STEP40:FORJ=1TO24STEP4:POKEI+J,A:POKEI+J+1,A:NEXTJ,I:RETURN
46 REM ********** CLEAR SPRITE *********
47 POKEFNA(C),ZL:POKEFNA(F),FL
48 PRINTLEFT$(CD$,14)"SURE ? [154]";:GOSUB30:IFA<>89ANDA<>13THEN52
49 MF(S)=1:GOSUB183
50 PRINT"";:FORI=1TO21:PRINTTAB(14)"........................":NEXT
51 FORI=SNTOSN+62:POKEI,0:NEXT
52 PRINTLEFT$(CD$,14)" ":GOSUB43:GOTO68
53 REM********* SET CURSOR *************
54 POKEFNA(C),ZL:POKEFNA(F),FL
55 IFX+R<38ANDX-L>13ANDY-U>1ANDY+D<23THEN60
56 IFLTHENX=38:GOTO60
57 IFUTHENY=23:GOTO60
58 IFDTHENY=1:GOTO60
59 IFRTHENX=13
60 X=X+R-L:Y=Y+D-U
61 ZL=PEEK(FNA(C)):FL=PEEK(FNA(F))
62 POKEFNA(C),43:POKEFNA(F),1
63 R=0:L=0:D=0:U=0:RETURN
64 REM ********** SLIP SPRITE **********
65 FORI=SN+62TOSNSTEP-1:POKEI,PEEK(I-3):NEXT:RETURN
66 FORI=SNTOSN+62:POKEI,PEEK(I+3):NEXT:RETURN
67 REM ******** MAIN MENU **************
68 PRINT""TAB(13)" "
69 PRINTLEFT$(CD$,13)
70 PRINT" "
71 PRINT" "
72 PRINT" "
73 PRINT" "
74 PRINT" SPACE [146] FOR"
75 PRINT"COMMAND LIST "
76 PRINT" "
77 PRINT" "
78 PRINT" "
79 PRINT" ":PRINT" "
80 PRINTLEFT$(CD$,24)"INPUT NO.? ";
81 GOSUB30
82 IFA>47ANDA<56THEN105:REM ON/OFF
83 IFA=67THEN192:REM COLOR
84 IFA=73THEN111:REM INCR.
85 IFA=77THENGOSUB183:GOTO80:REM MULTI
86 IFA=82THENGOSUB35:GOTO68:REM REPRO
87 IFA=81THEN154:REM EXIT
88 IFA=133THENGOSUB42:GOTO242:REM WORK
89 IFA=136THENGOSUB65:GOTO80:REM SLIP
90 IFA=140THENGOSUB66:GOTO80:REM SLIP
91 IFA=134THENGOSUB103:REM BACK COLOR
92 IFA=72THENGOSUB24:GOTO411:REM HANDLE
93 IFA=83THEN145:REM SCREENDAT
94 IFA=80THEN221:REM PRINTER
95 IFA=70THENGOSUB24:GOTO276:REM FLOPPY
96 IFA=68THEN362:REM DATALINE
97 IFA=75THENGOSUB24:GOTO439:REM KILL
98 IFA=36THEN120:REM $
99 IFA=64THEN374:REM @
100 IFA=32THEN387:REM COMMAND LIST
101 GOTO80
102 REM ******** BACKGROUND *************
103 POKEV+33,PEEK(V+33)+1AND15:RETURN
104 REM ******** SPRITE ON/OFF **********
105 S=A-48:SN=32768+S*64
106 IFS(S)=0THENS(S)=1:SN$(S)=".":POKEV+21,PEEK(V+21)AND255-2^S:GOSUB172:GOTO80
107 S(S)=0:SN$(S)=RIGHT$(STR$(S),1):GOSUB172:POKEV+2*S,56:POKEV+1+2*S,92
108 POKEV+21,PEEK(V+21)OR2^S:IFFI(S)=0THEN80
109 FI(S)=FI(S)-1
110 REM********* INCREASED *************
111 GOSUB162:IFFI(S)THEN113
112 FI(S)=1:POKEV+23,PEEK(V+23)OR2^S:GOTO80
113 IFFI(S)>1THEN115
114 FI(S)=2:POKEV+29,PEEK(V+29)OR2^S:GOTO80
115 IFFI(S)>2THEN117
116 FI(S)=3:POKEV+23,PEEK(V+23)AND255-2^S:GOTO80
117 POKEV+29,PEEK(V+29)AND255-2^S
118 GOSUB172:FI(S)=0:GOTO80
119 REM ********* DIRECTORY ************
120 GOSUB24:PRINT"[147].DIRECTORY.[154]":I=0
121 OPEN2,8,15:OPEN1,8,0,"$"
122 GET#1,A$,B$
123 GET#1,A$,B$
124 GET#1,A$,B$:I=I+1
125 B=0:IFA$<>""THENB=ASC(A$)
126 IFB$<>""THENB=B+ASC(B$)*256
127 PRINTMID$(STR$(B),2);TAB(5);
128 GET#1,B$:IFSTTHEN138
129 IFB$<>CHR$(34)THEN128
130 GET#1,B$:IFB$<>CHR$(34)THENPRINTB$;:GOTO130
131 GET#1,B$:IFB$=CHR$(32)THEN131
132 PRINTTAB(21);:C$=""
133 C$=C$+B$:GET#1,B$:IFB$<>""THEN133
134 PRINT" "LEFT$(C$,5)
135 GETT$:IFT$="[133]"THEN142
136 IFI=20THEN139
137 IFST=0THEN123
138 PRINT" BLOCKS FREE [146]":CLOSE1:CLOSE2:GOSUB141:GOTO16
139 PRINT" PRESS ANY KEY ...":GOSUB141
140 PRINT"[147].DIRECTORY.[154]":I=0:GOTO123
141 GETT$:IFT$=""THEN141
142 IFT$="[133]"THENCLOSE1:CLOSE2:GOTO16
143 RETURN
144 REM ******* GIVE OUT DECIMAL *******
145 GOSUB24:GOSUB156:PRINT"[144] ADR.";SN;"[154]":FORI=SNTOSN+62STEP3
146 A1$=STR$(PEEK(I)):A2$=STR$(PEEK(I+1)):A3$=STR$(PEEK(I+2))
147 A1$=LEFT$(O$,4-LEN(A1$))+MID$(A1$,1,4)
148 A2$=LEFT$(O$,4-LEN(A2$))+MID$(A2$,1,4)
149 A3$=LEFT$(O$,4-LEN(A3$))+MID$(A3$,1,4)
150 PRINT"[157]";A1$;A2$;A3$:NEXT
151 GOSUB159:POKE198,0:WAIT198,1
152 GOSUB156:GOSUB172:GOTO68
153 REM ************* EXIT *************
154 PRINT"";:END
155 REM ****** CLEAR DISPLAY AREA ******
156 PRINT""
157 FORI=1TO23:PRINT" ":NEXT:PRINT"";
158 REM ****** SCREEN LINE MSB *********
159 FORI=0TO6:POKE217+I,132:POKE230+I,134:NEXT
160 FORI=0TO5:POKE224+I,133:POKE237+I,135:NEXT:RETURN
161 REM*********************************
162 PRINT"[213][192][192][192][192][192][192][201]"
163 PRINT"[194] [194]"
164 PRINT"[194] [194]"
165 PRINT"[194] [194]"
166 PRINT"[194] [194]"
167 PRINT"[194] [194]"
168 PRINT"[194] [194]"
169 PRINT"[202][192][192][192][192][192][192][203]"
170 RETURN
171 REM*********************************
172 PRINT" ";:FORI=0TO7:IFI=STHENPRINT"";
173 PRINTSN$(I)"[154]";:NEXT:PRINT
174 PRINT" [213][192][192][192][201] "
175 PRINT" [194] [194] "
176 PRINT" [194] [194] "
177 PRINT" [194] [194] "
178 PRINT" [202][192][192][192][203] "
179 PRINT" "
180 PRINT" "
181 PRINT" ":RETURN
182 REM ********** MULTI MODE **********
183 IFMF(S)THEN185
184 POKEV+28,PEEK(V+28)OR2^S:MF(S)=1:GOTO186
185 POKEV+28,PEEK(V+28)AND255-2^S:MF(S)=0
186 PRINTLEFT$(CD$,13);
187 PRINT"MLT:";
188 FORI=0TO7:IFMF(I)THENPRINTRIGHT$(STR$(I),1);:GOTO190
189 PRINT".";
190 NEXT:PRINT:RETURN
191 REM ********** SET COLOR ***********
192 A=PEEK(V+37):C$(0)=STR$(A-240)
193 A=PEEK(V+38):C$(1)=STR$(A-240)
194 A=PEEK(V+39+S):C$(2)=STR$(A-240)
195 PRINTLEFT$(CD$,16);
196 PRINT"COLORS REG. "
197 PRINT"[163][163][163][163][163][163] [163][163][163][163] "
198 PRINT" 37 "
199 PRINT" "
200 PRINT" 38 "
201 PRINT" "
202 PRINT" "STR$(39+S)" [146] "
203 PRINT" "
204 PRINT" "
205 PRINTLEFT$(CD$,18)" "C$(0)" "
206 PRINT""C$(1)" ":PRINT""C$(2)" "
207 PRINTLEFT$(CD$,16)
208 I=0:GOSUB212:POKEV+37,B
209 I=1:GOSUB212:POKEV+38,B
210 I=2:GOSUB212:POKEV+39+S,B
211 GOTO68
212 PRINT" ";:B$=""
213 GOSUB30:IFA=13THEN217
214 IFA<48ORA>57THEN213
215 B$=B$+A$:PRINTA$;:IFLEN(B$)=2THEN218
216 GOTO213
217 IFB$=""THENPRINT:GOTO219
218 C$(I)=B$:PRINT" "
219 B=VAL(LEFT$(C$(I),3)):RETURN
220 REM ********** PRINTER OUT *********
221 PRINTLEFT$(CD$,25);
222 PRINT"NAME (20CHR.) ? [145]":PRINTTAB(16);:B$=""
223 GOSUB30:GOTO225
224 GOSUB33
225 IFA=20ANDB$<>""THENB$=LEFT$(B$,LEN(B$)-1):PRINTCHR$(20);:GOTO224
226 IFA=133THEN16
227 IFA=13THEN231
228 IFA=<32ORA>127THEN224
229 B$=B$+A$:IFLEN(B$)>20THEN231
230 PRINTA$" [157]";:GOTO224
231 PRINTLEFT$(CD$,11)TAB(17)" PRINTER ON ?[154] [157][157]";
232 GOSUB30
233 IFA=78THEN221
234 IFA=133THEN16
235 IFA<>13ANDA<>89THEN231
236 OPEN1,4:CMD1:PRINTB$
237 FORI=SNTOSN+62STEP3:
238 PRINTPEEK(I);PEEK(I+1);PEEK(I+2)
239 NEXT:PRINT
240 CLOSE1:GOTO16
241 REM ********* WORK ROUTINE *********
242 PRINT""TAB(14)"[144]- WORK -[154]"
243 PRINTLEFT$(CD$,15);
244 PRINT" "
245 PRINT"DOT(*)='*' "
246 PRINT" '@' "
247 PRINT"SPC(.)='=' "
248 PRINT" ';' "
249 PRINT" "
250 PRINT"[144]MENU ='F1' [154]"
251 PRINT" "
252 PRINT" USE'CRSR' "
253 PRINT" TO MOVE ! [146]";
254 X=0:Y=0:D=1:R=14:ZL=46:FL=1
255 GOSUB54
256 POKE198,0:WAIT198,1:GETA$:A=ASC(A$)
257 IFA=145THENU=1:GOTO255
258 IFA=157THENL=1:GOTO255
259 IFA=17THEND=1:GOTO255
260 IFA=29THENR=1:GOTO255
261 IFPEEK(654)THEN269
262 IFA=42THENR=1:ZL=42:GOSUB26:GOTO255
263 IFA=64THEND=1:ZL=42:GOSUB26:GOTO255
264 IFA=59THEND=1:ZL=46:GOSUB26:GOTO255
265 IFA=61THENR=1:ZL=46:GOSUB26:GOTO255
266 IFA=13THENL=X-14:GOTO255
267 IFA=133THENPOKEFNA(C),ZL:POKEFNA(F),FL:GOSUB43:GOTO68
268 IFA=19THENL=X-14:U=Y-2:GOTO255
269 IFA=192THENL=1:ZL=42:GOSUB26:GOTO255
270 IFA=93THENU=1:ZL=46:GOSUB26:GOTO255
271 IFA=186THENU=1:ZL=42:GOSUB26:GOTO255
272 IFA=61THENL=1:ZL=46:GOSUB26:GOTO255
273 IFA=147THEN47
274 GOTO256
275 REM ******** FLOPPY ****************
276 POKEV+21,0:PRINT"[147]"LEFT$(CD$,25)"[144] - 'F1'=EXIT -[154]";
277 FORI=0TO7:SP(I)=0:NEXT
278 PRINT".FLOPPY DISK CONTROLLER.[154]"
279 PRINT"[158]R[154]EAD OR [158]W[154]RITE ?"
280 GOSUB33
281 IFA=133THEN16
282 IFA$="R"THENM=0:B$="[158]READ[154]":C$="":B=7:GOTO285
283 IFA$="W"THENM=1:B$="[158]WRITE[154]":C$="S":B=0:GOTO285
284 GOTO278
285 PRINT"[145]MODE : [145]":PRINTTAB(8)B$:IFM=0THENB$="REPLACE"
286 PRINT"INPUT SPRITE"C$" YOU WANT TO "B$:B$="":PRINT"> ";
287 GOSUB33
288 IFA=133THEN276
289 IFA=13THEN292
290 IFA<48ORA>55THEN287
291 A=VAL(A$):PRINTA;:SP(A)=1:B=B+1:IFB<8THEN287
292 PRINT" <"
293 F$="":PRINT"FILENAME : ";
294 GOSUB33:IFA=20ANDLEN(F$)>0THENF$=LEFT$(F$,LEN(F$)-1):PRINTA$;
295 IFA=13THEN300
296 IFA<32ORA>127THEN294
297 PRINTA$;:F$=F$+A$
298 IFLEN(F$)>16THENPRINT"";:GOTO300
299 GOTO294
300 IFF$<>""THENFI$=F$:GOTO302
301 PRINTFI$;:IFFI$=""THENFI$="DATA"
302 FORI=0TO7:FI(I)=0:NEXT:POKEV+23,0:POKEV+29,0:X=0:Y=0:IFMTHEN321
303 REM ********** READ ****************
304 GOSUB339:GOSUB33:IFA<>13ANDA<>89THEN276
305 B$="[150]>>> READING <<<[154]":GOSUB343:NO=0
306 REM ********** INPUT ***************
307 OPEN15,8,15:OPEN2,8,2,FI$+",S,R"
308 INPUT#15,A,B$:IFATHENGOSUB318:GOTO276
309 PRINTTAB(3)"NO.:"NO:NO=NO+1
310 FORI=ADTOAD+62:INPUT#2,B
311 POKEI,B:NEXTI
312 IFST=64THENB$=" END OF DATA ! [154]":GOSUB343:GOSUB33:GOTO316
313 B$=" TAKE OVER ? [154]":GOSUB343
314 GOSUB33:IFA=133THEN316
315 IFA<>13ANDA<>89THENB$="[150]>>> READING <<<[154]":GOSUB343:GOTO309
316 POKEV+21,0:CLOSE2:CLOSE15:GOTO276
317 REM ********** ERRORS **************
318 PRINTLEFT$(CD$,25)TAB(3)B$" - PRESS ANY KEY";:GOSUB33
319 CLOSE2:CLOSE15:RETURN
320 REM *********** WRITE **************
321 FORK=0TO7:IFSP(K)=0THEN325
322 GOSUB339:GOSUB33:IFA<>13ANDA<>89THENSP(K)=0:GOTO324
323 SP(K)=2:X=1
324 B$=" ":GOSUB343
325 NEXTK:IFX=0THEN276
326 OPEN15,8,15:OPEN2,8,2,FI$+",S,W":X=0
327 INPUT#15,A,B$:IFA=63THENCLOSE2:OPEN2,8,2,FI$+",S,A":X=1
328 INPUT#15,A,B$:IFATHENGOSUB318:GOTO276
329 FORK=0TO7:S=K:IFSP(K)=0THEN336
330 GETA$:IFA$="[133]"THENK=7:GOTO336
331 SP(K)=1:Y=1:GOSUB339:Y=0
332 B$="<<< WRITING >>>[154]":GOSUB343
333 IFXTHENB$=" [150]APPEND ![154]":GOSUB343
334 FORJ=ADTOAD+62:B=PEEK(J):PRINT#2,B:NEXTJ
335 B$=" ":GOSUB343
336 SP(S)=0:NEXTK
337 CLOSE2:CLOSE15:GOTO276
338 REM ********** ASK OK ? ************
339 FORI=0TO7:S=I:AD=32768+64*S:IFSP(I)=1THENI=7
340 NEXTI:POKEV+2*S,56:POKEV+2*S+1,150:POKEV+21,2^S
341 PRINTLEFT$(CD$,12)" "S"[157] [146] ":IFYTHENRETURN
342 B$=" O.K. ? [154]"
343 PRINTLEFT$(CD$,16)" "B$:RETURN
344 REM *********** INTRO *************
345 POKE56576,5:POKE648,132:POKE56,124:REM SCREEN NACH 33792 - CHARACTERROM!!
346 PRINT"[147] .............................."
347 PRINT" . ."
348 PRINT" . S P R I T E A I D + ."
349 PRINT" . ."
350 PRINT" . [164][164][164][164][164][164][164][164][164][164][164] ."
351 PRINT" . WRITTEN BY M A T A N [146] ."
352 PRINT" . MARBURG ."
353 PRINT" . ."
354 PRINT" . [150] (C) M&T ."
355 PRINT" . ."
356 PRINT" ..............................[154]"
357 FORI=32768TO33344:POKEI,0:NEXT
358 PRINT"";:FORI=1TO19:PRINT" ";:FORII=1TO100:NEXTII,I
359 PRINT"PRESS ANY KEY.[154]"
360 GOTO33
361 REM ******** DATA LINES ************
362 POKEV+21,0:PRINT"[147].DATA GENERATOR.[154]"
363 PRINT"BEGIN WITH LINE (*10000) ? ";:GOSUB30
364 IFA<49ORA>54THEN16
365 PRINT"[147]"LEFT$(CD$,24)" GENERATE DATA LINES - W A I T !"
366 ZN=(A-48)*10000:T=0:POKE646,PEEK(V+33):FORI=1TO2000:NEXT
367 IFT=8THEN10
368 AD=32768+64*T:PRINT"[147]"ZN"REM SPRITE"T
369 FORII=0TO6:ZN=ZN+1:PRINTZN"[157]DATA";:FORI=0TO8
370 PRINTMID$(STR$(PEEK(AD+I+II*9)),2,3)",";:NEXTI
371 PRINTCHR$(20):NEXTII
372 PRINT"ZN="ZN+1":T="T+1":GOTO367";:GOTO447
373 REM******* SEND DISK COMMAND *******
374 GOSUB24:PRINT"[147].SEND DISK COMMAND.[154]":I=0
375 I=I+1:PRINTLEFT$(CD$,2*I+1)"=>";:C$=""
376 GOSUB33:IFA=20ANDLEN(C$)>0THENPRINTA$;:C$=LEFT$(C$,LEN(C$)-1):GOTO376
377 IFA=13THEN382
378 IFA=133THEN16
379 IFA<32ORA>127THEN376
380 C$=C$+A$:PRINTA$;
381 GOTO376
382 OPEN1,8,15,C$:INPUT#1,A,B$,C$:IFA=1THENPRINTLEFT$(CD$,25)C$;
383 GOSUB318:CLOSE1:IFA=133THEN16
384 PRINTLEFT$(CD$,25)" ";:IFI<8THEN375
385 GOTO374
386 REM ******* COMMAND LIST ***********
387 GOSUB24:GOSUB156
388 PRINT"COMMAND LIST[154]"LEFT$(CD$,3)
389 PRINT"SPRITES [146] "
390 PRINT"ON/OFF [146]=0-7 "
391 PRINT"INCR. = I "
392 PRINT"MULTI = M "
393 PRINT"COLOR = C "
394 PRINT"REPRO = R "
395 PRINT" WORK [146] = F1 "
396 PRINT"SLIP DWN= F7 "
397 PRINT"SLIP UP = F8 "
398 PRINT"BACKCOL.= F3 "
399 PRINT"HANDLE = H "
400 PRINT"SCREEN = S "
401 PRINT"PRINTER = P "
402 PRINT"DATALINE= D "
403 PRINT"FLOPPY = F "
404 PRINT"SHOW $ = $ "
405 PRINT"DISK-CMD= @ "
407 PRINT"KILL = K "
408 PRINT"QUIT = Q "
409 GOSUB33:GOSUB156:GOSUB172:GOTO68
410 REM ********* HANDLE ***************
411 POKEV+21,0:PRINT"[147].HANDLE SPRITES.[154]":Z=1:FORI=0TO7:S(I)=0:NEXT
412 PRINT"0-3 = SELECT SPRITE"
413 PRINT"'F7' = FAST MOVE."
414 PRINT"USE 'CRSR' TO MOVE !"
415 GOSUB33:PRINT"[147] : X= Y=":GOTO418
416 PRINT""TAB(10)PEEK(X)+255*SGN(PEEK(V+16)AND2^S)"[157] "TAB(22)PEEK(Y)"[157] "
417 GOSUB33
418 IFA<48ORA>55THEN424
419 S=VAL(A$):PRINT"NO."S
420 X=V+2*S:Y=V+2*S+1
421 IFS(S)THEN423
422 POKEV+21,PEEK(V+21)OR2^S:S(S)=1:GOTO416
423 POKEV+21,PEEK(V+21)AND255-2^S:S(S)=0:GOTO416
424 IFA=134THENGOSUB103:GOTO416
425 IFA=17THENPOKEY,PEEK(Y)+ZAND255:GOTO416
426 IFA=145THENPOKEY,PEEK(Y)-ZAND255:GOTO416
427 IFA=29THEN434
428 IFA=157THEN436
429 IFA<>136THEN432
430 IFZ=1THENZ=5:GOTO416
431 Z=1:GOTO416
432 IFA<>133THEN416
433 POKEV+21,0:POKEV+16,0:GOTO16
434 IFPEEK(X)>=256-ZTHENPOKEV+16,PEEK(V+16)OR2^S:POKEX,0
435 POKEX,PEEK(X)+ZAND255:GOTO416
436 IFPEEK(X)<=0+Z-1THENPOKEV+16,PEEK(V+16)AND255-2^S:POKEX,255
437 POKEX,PEEK(X)-ZAND255:GOTO416
438 REM *********** KILL ***************
439 PRINT"[147].CLEAR PROGRAM.[154]"
440 PRINT"ARE YOU SURE ? ";:GOSUB30
441 IFA<>89ANDA<>13THEN16
442 PRINT"[147]"LEFT$(CD$,24)" CLEAR PROGRAM EXCEPT DATA !!"
443 POKE646,PEEK(V+33):T=0
444 PRINT"";:FORI=TTOT+7:PRINTI:NEXT
445 IFT>439THENPRINT"POKE 646,14:END":GOTO447
446 PRINT"T="I":GOTO444"
447 POKE631,19:FORI=1TO9:POKE631+I,13:NEXT:POKE198,10:END