8-Bit Software Online Conversion
Y80 Faulty Program (HELP) - Listing
10REM >:0.$.weird
20REM
30REM Bug, virus or just impossible?
40REM
50REM Discovered by A. Savvides
60REM which meant he could not
70REM continue a masterpiece
80REM which he was writing...
90REM
100DIMfile$(31)
110:
120*KEY 1IF file$(11)="$.weird"THEN P.
"YES"|M
130*KEY 2IF file$(11)<>"$.weird"THEN P
."YES...Doubly weird"|M
140MODE7
150ONERRORPROCerr:END
160PROCfiles
170IFB%=0THENEND
180PROCcheck
190:
200DEFPROCfiles
210PRINT'"Files on disk:"'
220PRINT"(Notice no control codes)"'
230*FX3 2
240*DIR$
250*.
260*FX3
270A%=&0E08
280B%=0
290REPEAT
300IF?(A%+7)=0THENR$="$."ELSER$=CHR$(?
(A%+7))+"."
310file$=R$
320D%=0
330REPEAT
340IF?(A%+D%)>0OR?(A%+D%)<>&FFTHENfile
$=file$+CHR$(?(A%+D%))
350D%=D%+1
360UNTILD%=7OR?(A%+D%)=32
370PRINTB%+1;" '";file$;"'"
380B%=B%+1
390file$(B%)=file$
400A%=A%+8
410UNTIL?A%=0ORA%=&F00ORB%=32
420IFB%=0THENPRINT"No files found"
430ENDPROC
440:
450DEFPROCcheck
460FORFILE=1TOB%
470IFfile$(FILE)="$.weird"THENCLS:PRIN
T"$.weird ignored"
480NEXT
490PRINT'"End of check":VDU28,0,24,39,
13
500PRINT'"Key f1 to re-test (EQUAL TO)
"
510PRINT'"Key f2 to re-test (NOT EQUAL
TO)"
520END
530:
540DEFPROCerr
550*FX3
560REPORT:PRINT" at line ";ERL
570ENDPROC