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