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