10
20
30 :
40 DIM ctrl% 31,name% 31,mem% &3FFF:X%=ctrl%:Y%=X%DIV256
50 ON ERROR REPORT:PRINT" at line ";ERL:END
60 in%=0:out%=0:PROCScan("",1):PROCScan("",2)
70 END
80 :
90 DEFPROCScan(p$,find%)
100 LOCAL num%,idx%,f$,type%
110 REPEAT
120 f$=FNgbpb8(idx%):idx%=X%!9
130 IF f$<>"":PROCObject
140 UNTIL f$=""
150 ENDPROC
160 :
170 DEFPROCDir
180 IF find%=2:OSCLI"Dir "+f$:PROCScan(p$+"."+f$,1):PROCScan(p$+"."+f$,2):OSCLI"Dir ^":ENDPROC
190 ENDPROC
200 :
210 DEFPROCObject
220 type%=FNfile(f$,5):IF type%=2:PROCDir:ENDPROC
230 IF find%=2:ENDPROC
240 IF X%!10>&4000:ENDPROC
250 IF LEFT$(f$,5)="index" OR LEFT$(f$,1)="_":ENDPROC
260 OSCLI "Load "+f$+" "+STR$~mem%
270 FOR A%=0 TO X%!10-1
280 copy%=mem%?(A%+7)
290 IF !(mem%+A%+copy%)=&29432800:PROClist
300 NEXT A%
310 ENDPROC
320 :
330 DEFPROClist
340 IF (mem%!(A%+9) AND &80808080):ENDPROC
350 IF mem%?(A%+9)<33:ENDPROC
360 PRINTMID$(p$,2);LEFT$(".",p$<>"");f$;SPC(30-LENf$-LENp$);~A%+&8000;": ";:B%=A%+9
370 REPEAT:VDU mem%?B%:B%=B%+1:UNTILmem%?B%<32 OR mem%?B%>126
380 PRINT:ENDPROC
390 :
400 DEFFNfile(A$,A%):$name%=A$:?X%=name%:X%?1=name%DIV256:=(USR&FFDD)AND&FF
410 DEFPROCgbpb(A%,ch%,X%!1,X%!5,X%!9):?X%=ch%:CALL &FFD1:ENDPROC
420 DEFFNgbpb8(ptr%):X%!1=name%:X%!5=1:X%!9=ptr%:A%=8:CALL&FFD1:IFX%!5=1:=""
430 A%=name%+1:A%!(A%?-1)=&D20:A%?(INSTR($A%," ")-1)=13:=$A%