home *** CD-ROM | disk | FTP | other *** search
/ Loadstar 37 / 037.d81 / dir_blocks (.txt) < prev    next >
Commodore BASIC  |  2022-08-26  |  2KB  |  63 lines

  1. 10 gosub60100:poke53280,.:poke53281,.
  2. 20 print"[147][159]directory reader [154]by joseph r. charnetski"
  3. 30 print"      [159]blocks free [154]by geoff larson"
  4. 40 print"        d [154]- view directory"
  5. 50 print"        b [154]- view blocks free"
  6. 60 print"        q [154]- quit"
  7. 70 print"        choose d[154], b[154], or q[154]."
  8. 80 a=peek(203):ifa<>18anda<>28anda<>62then80
  9. 90 ifa=62thengosub60000:goto70
  10. 100 gs=1:ifa=28thengs=2
  11. 110 open15,8,15,"i0":input#15,er,er$:close15:ifer=.then140
  12. 120 print"disk error:[150]"er,er$
  13. 130 fora=1to2000:next:print"[145]                                      [145][145]":goto80
  14. 140 ifgs=1thenprint"[147]";
  15. 145 ongsgosub800,900
  16. 150 ifgs=2thenprint"[154]        blocks free:"f
  17. 160 print"        [154]press space [154]to continue."
  18. 170 a=peek(203):ifa<>60then170
  19. 180 goto20
  20. 800 rem directory - joseph r.charnetski
  21. 810 open1,8,0,"$":get#1,a$,a$
  22. 820 get#1,a$,a$:ifa$=""then880
  23. 830 get#1,b$,c$
  24. 840 bl=asc(b$+chr$(0)):bh=asc(c$+chr$(0))
  25. 850 d$=mid$(str$(bl+256*bh),2)+chr$(32)
  26. 860 printd$;:get#1,d$:ifd$<>""then860
  27. 870 print:gete$:ife$<>"q"then820
  28. 880 close1:return
  29. 900 rem blocks free - geoff larsen
  30. 910 deffna(x)=asc(a$+chr$(0))+256*(asc(b$+chr$(0)))
  31. 920 open1,8,0,"$$0":get#1,a$,b$
  32. 930 get#1,a$,b$:iffna(x)=0then970
  33. 940 get#1,c$,d$
  34. 950 get#1,e$:ifasc(e$+chr$(0))then950
  35. 960 goto930
  36. 970 a$=c$:b$=d$:f=fna(x):close1
  37. 980 return
  38. 60000 print"[145]  [154]are you sure you want to quit? (y[154]/n[154])"
  39. 60010 a=peek(203):ifa<>25anda<>39then60010
  40. 60020 ifa=39thenprint"[145]                                      [145]":return
  41. 60030 open15,8,15,"r0:hello connect=hello connect":input#15,er:close15
  42. 60040 poke198,.:load"hello connect",8
  43. 60100 poke53280,14:poke53281,14
  44. 60110 print"[147]"chr$(142)"[153][213][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][201]";
  45. 60120 fora=1to23:print"[221]"spc(38)"[221]";:next
  46. 60130 print"[202][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][203][157][148][192]"
  47. 60140 fora=217to242:pokea,peek(a)or128:next
  48. 60150 print"         loadstar presents:"
  49. 60160 print"                              "
  50. 60170 print"       dir reader/blocks free  "
  51. 60180 print"                               "
  52. 60190 print"           subroutines by      "
  53. 60200 print"        joseph r. charnetski   "
  54. 60210 print"                and            "
  55. 60220 print"            geoff larson       "
  56. 60230 print"                               "
  57. 60240 print"           copyright 1987      "
  58. 60250 print"                               "
  59. 60260 print"                               "
  60. 60270 print"       press space to continue."
  61. 60280 a=peek(203):ifa<>60then60280
  62. 60290 return
  63.