10
20
30 :
40 DIM ctrl% 31,mem% 255:X%=ctrl%:Y%=X%DIV256:name%=mem%
50 idx%=0:REPEAT:f$=FNgbpb8(idx%):idx%=X%!9:IF f$<>"":PROCObject
60 UNTIL f$="":END
70 :
80 DEFPROCObject
90 IF FNfile(f$,5)<>1:ENDPROC
100 in%=OPENIN(f$):IF in%=0:ENDPROC
110 PROCgbpb(3,in%,mem%,256,0):CLOSE#in%:in%=0
120 rtype%=mem%?6:rcopy%=mem%?7
130 IF mem%!rcopy%<>&29432800:ENDPROC
140 PRINTLEFT$(f$,10);TAB(11);
150 PRINT"&";FNh0(rtype%,2);" ";
160 IF rtype%AND128:PRINT"S"; ELSE PRINT"-";
170 IF rtype%AND64 :PRINT"L"; ELSE PRINT"-";
180 IF rtype%AND32 :PRINT"R"; ELSE PRINT"-";
190 IF rtype%AND16 :PRINT"E"; ELSE PRINT"-";
200 PRINT" ";MID$("BASICTurbo65x2 68xx CPU4 CPU5 CPU6 PDP11Z80 32000CPU1080x86CPU12ARM CPU14CPU15",(rtype%AND15)*5+1,5);
210 num%=1:ptr%=mem%+9:REPEAT
220 IF ptr%>rcopy%+mem%:num%=3
230 A$=FNs(FNstr(ptr%)):PRINTTAB(num%*19+7);LEFT$(A$,18);
240 REPEATptr%=ptr%+1:UNTILptr%?-1=0:num%=num%+1
250 UNTIL ptr%>rcopy%+mem%+1
260 IF (rtype%AND&60)<>&60:PRINT:ENDPROC
270 count%=1:rtype%=rtype%AND15
280 IF rtype%=7 OR rtype%=9:count%=2
290 FOR num%=1 TO count%
300 PRINTTAB(num%*18-7);
310 IF num%=1:PRINT"Load: ";
320 IF num%=2:PRINT"Entry: ";
330 PRINT"&";FNh0(!ptr%,8);:ptr%=ptr%+4
340 NEXT num%
350 PRINT:ENDPROC
360 :
370 DEFFNfile(A$,A%):$name%=A$:?X%=name%:X%?1=name%DIV256:=(USR&FFDD)AND&FF
380 DEFPROCgbpb(A%,ch%,X%!1,X%!5,X%!9):?X%=ch%:CALL &FFD1:ENDPROC
390 DEFFNgbpb8(ptr%):X%!1=name%:X%!5=1:X%!9=ptr%:A%=8:CALL&FFD1:IFX%!5=1:=""
400 A%=name%+1:A%!(A%?-1)=&D20:A%?(INSTR($A%," ")-1)=13:=$A%
410 DEFFNstr(A%):IF?A%<32:=""
420 A$="":REPEAT:A$=A$+CHR$?A%:A%=A%+1:UNTIL?A%<32:=A$
430 DEFFNh0(A%,N%)=RIGHT$("0000000"+STR$~A%,N%)
440 DEFFNs(A$):IFLEFT$(A$,1)=" ":REPEATA$=MID$(A$,2):UNTILLEFT$(A$,1)<>" "
450 IFRIGHT$(A$,1)=" ":REPEATA$=LEFT$(A$,LENA$-1):UNTILRIGHT$(A$,1)<>" "
460 =A$