home *** CD-ROM | disk | FTP | other *** search
/ Loadstar 35 / 035.d81 / copier (.txt) < prev    next >
Commodore BASIC  |  2022-08-26  |  2KB  |  70 lines

  1. 10 ify=0theny=1:load"filecopy.o",8,1
  2. 11 poke56,32:clr:dim f$(100),t$(100)
  3. 12 gosub500
  4. 15 fl$="":f=32768
  5. 17 a=peek(f):ifa<>0thenfl$=fl$+chr$(a):f=f+1:goto17
  6. 18 print:print"[208]ress [211][208][193][195][197] to start copying; [210][197][212][213][210][206] to"
  7. 19 print" return to [204][207][193][196][211][212][193][210]."
  8. 20 geta$:ifa$<>" "anda$<>chr$(13)then20
  9. 22 ifa$=chr$(13)then131
  10. 25 open2,8,2,"files on side "+si$
  11. 30 input#2,a$:i=st:input#2,nf$:nf=val(nf$)
  12. 35 forx=1tonf:input#2,f$(x),t$(x):next
  13. 40 ifa$<>fl$andi=0then30
  14. 45 ifa$=fl$then50
  15. 47 print"error....file "fl$" not found in file!":stop
  16. 48 :
  17. 50 close2:ford=1tonf
  18. 55 poke51,0:poke52,32
  19. 56 print"[145]                                       "
  20. 57 print"[145][154][210]eading:"f$(d)
  21. 60 open1,8,2,f$(d):sys49152
  22. 70 ifst<>64thenprint"error..."st:close1:stop
  23. 80 close1
  24. 90 print"       [201]nsert [196]estination [196]isk...      "
  25. 92 print"    [208]ress [211][208][193][195][197] when ready to copy.":poke198,.
  26. 94 geta$:ifa$<>" "then94
  27. 95 print"[145][145]";:fora=1to2:print"                                      ":next
  28. 96 print"[145][145][145][145][154][215]riting:"f$(d):gosub700
  29. 97 ifmm=1then90
  30. 98 ifmm=2then96
  31. 100 open1,8,2,f$(d)+","+t$(d)+",w":sys49196:close1
  32. 120 print"          [201]nsert [211]ource [196]isk...      "
  33. 122 print" [208]ress [211][208][193][195][197] when ready to continue.":poke198,.
  34. 124 geta$:ifa$<>" "then124
  35. 125 gosub600:rem    if(mm$<>dn$)thengosub2000
  36. 126 print"[145][145]";:fora=1to2:print"                                       ":next
  37. 127 print"[145][145][145]";
  38. 129 nextd
  39. 130 printspc(13)"[196]one copying..."
  40. 131 open15,8,15,"r0:hello connect=hello connect":input#15,er:close15
  41. 132 ifer<>63thenend
  42. 133 poke55,.:poke56,160
  43. 134 load"hello connect",8:end
  44. 500 poke53280,.:poke53281,.
  45. 510 sys51459:print"[147]         [158][204][207][193][196][211][212][193][210] [198]ile [195]opier"
  46. 520 gosub600:si$=right$(dn$,1):mm$=dn$
  47. 550 print" [154][208]lease [215]ait -- [210]eading [198]iles [207]n [211]ide "si$:return
  48. 600 open15,8,15,"i0":open8,8,8,"#"
  49. 610 print#15,"ua:8 0 18 0"
  50. 620 print#15,"b-p:8 144"
  51. 630 dn$="":fora=1to16:get#8,a$:dn$=dn$+a$:next:close8:close15:return
  52. 700 open15,8,15,"r0:"+f$(d)+"="+f$(d):input#15,er:close15
  53. 710 ifer<>63thenmm=.:return
  54. 715 print"[145]                                     "
  55. 720 print"[145]"f$(d)" [154]already exists..."
  56. 730 print"     [212][154]ry again with another disk."
  57. 740 print"     [211][154]cratch and replace file."
  58. 760 print"[195]hoose [212][154], or [211][154]."
  59. 770 geta$:ifa$=""then770
  60. 780 ifa$="t"ora$="[212]"then820
  61. 790 ifa$="s"ora$="[211]"then840
  62. 810 goto770
  63. 820 gosub1000:mm=1:return
  64. 840 gosub1000:print"[154][211]cratching:"f$(d)
  65. 850 open15,8,15,"s0:"+f$(d):close15:print"[145]                                    "
  66. 860 mm=2:return
  67. 1000 print"[145][145][145][145][145][145]";:fora=1to6:print"                                       "
  68. 1010 next:print"[145][145][145][145][145]";:return
  69. 2000 print"[145][145]"mm$" is not in the drive."
  70.