home *** CD-ROM | disk | FTP | other *** search
/ Commodore Disk User Volume 3 #12 / Commodore_Disk_User_Vol.3_12_1990_-.d64 / prob1 (.txt) < prev    next >
Commodore BASIC  |  2022-10-26  |  1KB  |  33 lines

  1. 10 rem ********************************
  2. 20 rem *  copyright cdu october 1990  *
  3. 30 rem *  program written by j.finch  *
  4. 40 rem *    (cdu technical dept.)     *
  5. 50 rem *                              *
  6. 60 rem * '128 file protected' disable *
  7. 70 rem ********************************
  8. 80 :
  9. 90 poke53280,14:poke53281,6:print"[147][142]please enter name of program file",":";
  10. 100 open1,0:input#1,f$:close1:print:print"do you know the sector number on"
  11. 110 print"which this file can be found? press y/n[146]":poke198,0:z=0:s=1:f=0
  12. 120 geta$:ifa$="n"then170
  13. 130 ifa$<>"y"then120
  14. 140 print"the file is on track 18. please enter   number of sector",,,":";
  15. 150 open1,0:input#1,s$:close1:s=val(s$):ifs<1ors>18thenrun
  16. 160 print:z=1
  17. 170 print"[147]searching...":open15,8,15,"i0":open8,8,8,"#"
  18. 180 print#15,"u1 8 0 18"s:input#15,e,e$,a,b:ifethen310
  19. 190 print#15,"b-p:8 0":get#8,t$:get#8,s$:nt=asc(t$+chr$(0)):ns=asc(s$+chr$(0))
  20. 200 print,,"[145](sector"s"[157]) ":forn=0to7:print#15,"b-p:8"5+n*32:fl$=""
  21. 210 forl=1to16:get#8,a$:fl$=fl$+a$:next
  22. 220 ifleft$(fl$,len(f$))=f$thenf=n+1:n=7
  23. 230 next:iff>0then270
  24. 240 s=ns:ifnt=18then180
  25. 250 close8:close15:print"[147]filename not found - press any key"
  26. 260 poke198,0:wait198,1:poke198,0:run
  27. 270 print"[147]file found - unprotecting...":print#15,"b-p:8"2+(f-1)*32
  28. 280 get#8,a$:a=asc(a$+chr$(0)):print#15,"b-p:8"2+(f-1)*32
  29. 290 print#8,chr$(a and 191);:print#15,"u2 8 0 18"s
  30. 300 print"ok - it's done.":close8:close15:end
  31. 310 close8:close15:print"[147]disk error: "e$:print"press any key"
  32. 320 poke198,0:wait198,1:poke198,0:run
  33.