home *** CD-ROM | disk | FTP | other *** search
/ Loadstar 1 / 001.d81 / filescan (.txt) < prev    next >
Commodore BASIC  |  2022-08-26  |  1KB  |  32 lines

  1. 10 open8,8,8,"#":open15,8,15:z$=chr$(.):dimft$(4)
  2. 15 fori=.to4:readft$(i):next:datadeleted,sequential,program,user,relative
  3. 20 input"[147]file name  (x) to exit";f$:iff$="x"then200
  4. 30 t=18:s=.:gosub1000:ifer>19thenprint"bad bam block.":goto200
  5. 40 t=nt:s=ns:gosub1000:ifer>19thenprint"bad directory block.":goto200
  6. 50 fori=.to7:b=32*i+5:gosub1200:n$="":forj=1tolen(f$):get#8,a$:n$=n$+a$:next
  7. 55 iflen(f$)<16thenget#8,a$:ifa$<>"[160]"thenn$=n$+a$
  8. 60 ifn$<>f$thennext:ifnt=0thenprint"end of direcotry -- file not found":goto200
  9. 65 ifn$<>f$then40
  10. 70 n=i:i=7:next:b=32*n+2:gosub1200:get#8,a$:ft%=asc(a$+z$)
  11. 80 ifft%>0andft%<128thenprint"unclosed ";
  12. 90 ifft%=128thenprint"improperly deleted file":goto200
  13. 100 if(ft%and127)>4thenprint"undefined type file":goto200
  14. 110 printft$(ft%and127)" file,";:get#8,t$,s$:nt=asc(t$+z$):ns=asc(s$+z$)
  15. 120 b=32*n+30:gosub1200:get#8,l$,h$:nb=asc(l$+z$)+256*asc(h$+z$):printnb"blocks long
  16. 130 [153]"data blocks:":[139](ft%[175]127)[178]4[167]300
  17. 140 [129]i[178]1[164]nb:t[178]nt:s[178]ns:[153]t;s:[151]56329,.:[151]56328,.:[141]1000
  18. 150 [139]er[177]19[167]300
  19. 160 [139][194](56329)[167][153]"on","marginal block":mb[178]mb[170]1
  20. 170 [130]:[153]bb"bad blocks found.":[153]cb"read error 23's corrected."
  21. 180 [153]mb"marginal blocks found."
  22. 200 [160]8:[160]15
  23. 201 [153]:[153]"do you want to scan another? (y/n)":[133]"";yn$:[139] yn$[178]"y"[167][138]
  24. 205 [153]"loadload"[199](34)"payload"[199](34)",8":[153]"run"
  25. 210 [151]631,13:[151]632,13:[151]198,2:[128]
  26. 300 [153]"on",er$;er:[137]170
  27. 1000 [152]15,"ua:8 0"t;s:[141]1500:[152]15,"b-p:8"0:[161]#8,t$,s$:nt[178][198](t$[170]z$)
  28. 1010 ns[178][198](s$[170]z$):[142]
  29. 1200 [152]15,"b-p:8"b:[142]
  30. 1500 [132]15,er,er$,et,es:[139]er[167][153]er;er$;et;es
  31. 1510 [142]
  32.