home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
8bitfiles.net/archives
/
archives.tar
/
archives
/
genie-commodore-file-library
/
C64Toolkit
/
C64-1581-BACKUP
(
.txt
)
< prev
next >
Wrap
Commodore BASIC
|
2019-04-13
|
4KB
|
72 lines
10 SYS04839:R$="TRY"
15 POKE53281,0:POKE53280,0
20 PS=0:BL$=" "
25 BL$=BL$+"[157][157][157][157][157][157][157][157][157][157][157][157][157][157][157][157][157][157][157][157][157][157][157][157][157][157][157][157][157][157][157][157][157][157][157][157][157]":D$=""
30 L2$="[155][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]":ZZ=8:PX=57093:POKEPX,0:IF(PEEK(PX)<>0)THEN45
35 POKEPX,255:IF(PEEK(PX)<>255)THEN45
40 ZZ=3
45 ND=0:U=8:GOSUB330
50 U=9:GOSUB330:IFND=2THEN65
55 U=10:GOSUB330:IFND=2THEN65
60 U=11:GOSUB330
65 U=SU:AP$=RIGHT$(STR$(ZZ),2)+" PASSES ":IFND=2THENAP$=" ONE PASS "
70 PRINT"[147]"SPC(7)L2$:PRINTSPC(7)"[159] C64 BACKUP 1581 DISK ":PRINTSPC(7)L2$
75 PRINT"[159] TO AVOID MISTAKES, SLIDE THE WRITE "
80 PRINT" PROTECT TAB ON THE RIGHT SIDE OF "
85 PRINT" YOUR ORIGINAL DISK INTO THE OPEN "
90 PRINT" POSITION. IT WILL TAKE 20 MINUTES ":REMAP$
95 PRINT" TO BACKUP A FULL DISK. "
100 LN$=" "+L2$+"[192][192][192][192][192][192][192][192][192][192][192]":U$="[145][145][145][145][145][145][145][145]"
105 PRINT""LN$:PRINTSPC(2)"[159] INSTRUCTIONS:":PRINTLN$""D$
110 UU=1:IFU>9THENUU=2
115 IFPEEK(10255)=0THEN225
120 IF ND=0 THEN225
130 PRINTLN$:PRINT" [159]UNIT:"U SPC(UU)"[159] PASS: 1 [159]R TO RESTART"
135 PRINTLN$"[145][145][145][145][145][145][145][145][145][145][145][145]"
140 GOSUB350:POKE10260,U:GOSUB235:SYS10240:PRINT"";
145 GOSUB315:IFA<>0THEN280
150 GOSUB235
155 OPEN15,U,15,"N0:TEMP,"+ID$:CLOSE15
160 LN=0:GOSUB315:IFA<>0THENLN=150:GOTO280
165 SYS10243:PRINT"";
170 GOSUB315:IFA<>0THEN280
175 FORPX=0TOZZ-2
180 GOSUB235:SYS10240:PRINT"";
185 GOSUB315:IFA<>0THEN280
190 GOSUB235:SYS10243:PRINT"";
195 GOSUB315:IFA<>0THEN280
200 IFPEEK(10255)=81THEN210
205 NEXTPX
210 OPEN15,U,15,"I0":CLOSE15
215 PRINT""D$D$D$:GOSUB325:PRINTSPC(13)"ALL DONE.":R$="RUN":GOTO285
220 POKE52,160:POKE56,160:CLR:END
225 PRINT""D$D$D$:GOSUB325:PRINTSPC(9)"SORRY, BAD CONNECTION"
230 PRINTSPC(8)"C128 WITH 1581 REQUIRED.":GOTO285
235 IF(PS>1)AND((PSAND1)=0)THENGOSUB320
240 AP$="WRIT":DP$="DESTINATION":PS=PS+1
245 IF(PSAND1)=1THENDP$="ORIGINAL":AP$="READ"
250 AG$=" AGAIN,":IFPS<3THENAG$=","
255 PRINTSPC(7)"INSERT "DP$" DISK"AG$
260 PRINTSPC(7)"PRESS ANY KEY WHEN READY."
265 GETA$:IFA$=""THEN265
270 IFA$="R"THENCLR:GOTO310
275 PRINTSPC(7)AP$"ING...":RETURN
280 PRINT""D$D$D$:GOSUB325:PRINTSPC(11)"SORRY, DISK ERROR"
285 PRINT:PRINTSPC(7)"PRESS Q TO QUIT; OR PRESS"
290 PRINTSPC(7)"ANY OTHER KEY TO "R$" AGAIN,"
295 GETA$:IFA$=""THEN295
300 IFA$="Q"THENPRINT"[147]":GOTO220
305 IFLN=150THENGOSUB315:PRINT"[145][145]":GOTO150
310 POKE52,160:POKE56,160:CLR:RUN
315 OPEN15,U,15:INPUT#15,A,B$,C,D:CLOSE15
316 IFPEEK(10269)<>0THENA=78:B$="BACKUP READ ERROR":RETURN
317 IFPEEK(10270)<>0THENA=78:B$="BACKUP WRITE ERROR":RETURN
318 RETURN
320 PRINT""SPC(19)PS/2+1"[145][145][145]"
325 PRINTU$;:FORX=1TO8:PRINTBL$"";:NEXTX:PRINT"[145]"U$:RETURN
330 POKE10268,U:SYS10252
335 IFPEEK(10268)=0THEN345
340 ND=ND+1:DU=U:IFND=1THENSU=U
345 RETURN
350 OPEN2,U,0,"$0:":FORX=1TO26:GET#2,A$:NEXT:GET#2,A$,B$:ID$=A$+B$:CLOSE2:RETURN