home *** CD-ROM | disk | FTP | other *** search
/ 64'er 1992 January / 64er_Magazin_92-01_1992_Markt__Technik_de_Side_A.d64 / unscratch (.txt) < prev    next >
Commodore BASIC  |  2022-10-26  |  1KB  |  47 lines

  1. 500 rem * unscratch by cem can *
  2. 530 :
  3. 1000 poke53280,0:poke53281,0:poke53272,21:print"[147]"+chr$(8):clr
  4. 1010 print"[145][158]unscratch"
  5. 1020 print"name des gescratchden files ":inputn$
  6. 1025 iflen(n$)=0orlen(n$)>16then1000
  7. 1026 print"[158] diskette einlegen und space druecken [146]"
  8. 1027 geta$:ifa$<>chr$(32)then1027
  9. 1030 v=16:q=32:f=256:t=18:s=1:w=0:d=0:z$=chr$(0):d$=right$(str$(d),1)
  10. 1040 n$=left$(n$,v):l=len(n$):ifright$(n$,1)<>"*"then1060
  11. 1050 l=l-1:n$=left$(n$,l):w=1:goto1080
  12. 1060 ifl=vthen1080
  13. 1070 forx=l+1tov:n$=n$+chr$(160):next:l=v
  14. 1080 open1,8,15,"i"+d$:gosub1330:open2,8,2,"#":gosub1330
  15. 1090 print#1,"u1:";2;d;t;s:gosub1330
  16. 1100 print#1,"b-p:";2;0:get#2,a$,b$
  17. 1110 tr=asc(a$+z$):sc=asc(b$+z$):h=2
  18. 1120 print#1,"b-p:";2;h:get#2,t$
  19. 1130 c=asc(t$+z$):ifc>0then1160
  20. 1140 get#2,a$,b$:f$="":forx=1tov:get#2,t$:f$=f$+t$:next:iff$=""then1180
  21. 1150 ifl=0orn$=left$(f$,l)then1210
  22. 1160 h=h+q:ifh<fthen1120
  23. 1170 iftr>0thent=tr:s=sc:goto1090
  24. 1180 ifwthenprint"[158] directory-ende [146]":goto1315
  25. 1190 print" scratched file nicht gefunden "
  26. 1200 forx=1to5000:next:goto1320
  27. 1210 a=asc(a$+z$):b=asc(b$+z$)
  28. 1220 print"file bei track";a;"sector";b;"gefunden"
  29. 1230 print"zurueckholen (j/n) ? j[157][157][157]";:inputx$
  30. 1240 ifx$="j"then1270
  31. 1245 ifx$="n"thenclose2:close1:end
  32. 1250 ifwthen1160
  33. 1260 goto1320
  34. 1270 print"1=seq / 2=prg / 3=usr / 4=rel"
  35. 1280 input"welchen file-typ ? 2[157][157][157]";p
  36. 1290 ifp<1orp>4then"[145][145]":goto1250
  37. 1300 print#1,"b-p:";2;h:print#2,chr$(p+128);:print#1,"u2:";2;d;t;s:gosub1330:g=1
  38. 1310 print" file unscratched ":ifwthen1160
  39. 1315 print"mehr files zuruckholen (j/n)   j[157][157][157]";
  40. 1316 inputx$:ifx$<>"j"then1350
  41. 1320 close2:close1:goto1000
  42. 1330 input#1,e,m$,j,k:ife=0thenreturn
  43. 1340 print" error [146]:  ";e;m$;j;k
  44. 1350 close2:close1:ifg=0thenend
  45. 1360 print"[147] rebuilding valid bam on disk "
  46. 1370 open1,8,15,"v"+d$:close1:end
  47.