home *** CD-ROM | disk | FTP | other *** search
/ 8bitfiles.net/archives / archives.tar / archives / genie-commodore-file-library / C64Toolkit / C64-1581-BACKUP (.txt) < prev    next >
Commodore BASIC  |  2019-04-13  |  4KB  |  72 lines

  1. 10 SYS04839:R$="TRY"
  2. 15 POKE53281,0:POKE53280,0
  3. 20 PS=0:BL$="                                     "
  4. 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$=""
  5. 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
  6. 35 POKEPX,255:IF(PEEK(PX)<>255)THEN45
  7. 40 ZZ=3
  8. 45 ND=0:U=8:GOSUB330
  9. 50 U=9:GOSUB330:IFND=2THEN65
  10. 55 U=10:GOSUB330:IFND=2THEN65
  11. 60 U=11:GOSUB330
  12. 65 U=SU:AP$=RIGHT$(STR$(ZZ),2)+" PASSES   ":IFND=2THENAP$=" ONE PASS   "
  13. 70 PRINT"[147]"SPC(7)L2$:PRINTSPC(7)"[159]  C64 BACKUP 1581 DISK   ":PRINTSPC(7)L2$
  14. 75 PRINT"[159] TO AVOID MISTAKES, SLIDE THE WRITE "
  15. 80 PRINT" PROTECT TAB ON THE RIGHT SIDE OF   "
  16. 85 PRINT" YOUR ORIGINAL DISK INTO THE OPEN   "
  17. 90 PRINT" POSITION.  IT WILL TAKE 20 MINUTES ":REMAP$
  18. 95 PRINT" TO BACKUP A FULL DISK.             "
  19. 100 LN$="  "+L2$+"[192][192][192][192][192][192][192][192][192][192][192]":U$="[145][145][145][145][145][145][145][145]"
  20. 105 PRINT""LN$:PRINTSPC(2)"[159] INSTRUCTIONS:":PRINTLN$""D$
  21. 110 UU=1:IFU>9THENUU=2
  22. 115 IFPEEK(10255)=0THEN225
  23. 120 IF ND=0 THEN225
  24. 130 PRINTLN$:PRINT"   [159]UNIT:"U SPC(UU)"[159]  PASS: 1   [159]R TO RESTART"
  25. 135 PRINTLN$"[145][145][145][145][145][145][145][145][145][145][145][145]"
  26. 140 GOSUB350:POKE10260,U:GOSUB235:SYS10240:PRINT"";
  27. 145 GOSUB315:IFA<>0THEN280
  28. 150 GOSUB235
  29. 155 OPEN15,U,15,"N0:TEMP,"+ID$:CLOSE15
  30. 160 LN=0:GOSUB315:IFA<>0THENLN=150:GOTO280
  31. 165 SYS10243:PRINT"";
  32. 170 GOSUB315:IFA<>0THEN280
  33. 175 FORPX=0TOZZ-2
  34. 180 GOSUB235:SYS10240:PRINT"";
  35. 185 GOSUB315:IFA<>0THEN280
  36. 190 GOSUB235:SYS10243:PRINT"";
  37. 195 GOSUB315:IFA<>0THEN280
  38. 200 IFPEEK(10255)=81THEN210
  39. 205 NEXTPX
  40. 210 OPEN15,U,15,"I0":CLOSE15
  41. 215 PRINT""D$D$D$:GOSUB325:PRINTSPC(13)"ALL DONE.":R$="RUN":GOTO285
  42. 220 POKE52,160:POKE56,160:CLR:END
  43. 225 PRINT""D$D$D$:GOSUB325:PRINTSPC(9)"SORRY, BAD CONNECTION"
  44. 230 PRINTSPC(8)"C128 WITH 1581 REQUIRED.":GOTO285
  45. 235 IF(PS>1)AND((PSAND1)=0)THENGOSUB320
  46. 240 AP$="WRIT":DP$="DESTINATION":PS=PS+1
  47. 245 IF(PSAND1)=1THENDP$="ORIGINAL":AP$="READ"
  48. 250 AG$=" AGAIN,":IFPS<3THENAG$=","
  49. 255 PRINTSPC(7)"INSERT "DP$" DISK"AG$
  50. 260 PRINTSPC(7)"PRESS ANY KEY WHEN READY."
  51. 265 GETA$:IFA$=""THEN265
  52. 270 IFA$="R"THENCLR:GOTO310
  53. 275 PRINTSPC(7)AP$"ING...":RETURN
  54. 280 PRINT""D$D$D$:GOSUB325:PRINTSPC(11)"SORRY, DISK ERROR"
  55. 285 PRINT:PRINTSPC(7)"PRESS Q TO QUIT; OR PRESS"
  56. 290 PRINTSPC(7)"ANY OTHER KEY TO "R$" AGAIN,"
  57. 295 GETA$:IFA$=""THEN295
  58. 300 IFA$="Q"THENPRINT"[147]":GOTO220
  59. 305 IFLN=150THENGOSUB315:PRINT"[145][145]":GOTO150
  60. 310 POKE52,160:POKE56,160:CLR:RUN
  61. 315 OPEN15,U,15:INPUT#15,A,B$,C,D:CLOSE15
  62. 316 IFPEEK(10269)<>0THENA=78:B$="BACKUP READ ERROR":RETURN
  63. 317 IFPEEK(10270)<>0THENA=78:B$="BACKUP WRITE ERROR":RETURN
  64. 318 RETURN
  65. 320 PRINT""SPC(19)PS/2+1"[145][145][145]"
  66. 325 PRINTU$;:FORX=1TO8:PRINTBL$"";:NEXTX:PRINT"[145]"U$:RETURN
  67. 330 POKE10268,U:SYS10252
  68. 335 IFPEEK(10268)=0THEN345
  69. 340 ND=ND+1:DU=U:IFND=1THENSU=U
  70. 345 RETURN
  71. 350 OPEN2,U,0,"$0:":FORX=1TO26:GET#2,A$:NEXT:GET#2,A$,B$:ID$=A$+B$:CLOSE2:RETURN
  72.