home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Loadstar 79
/
079.d81
/
copier
(
.txt
)
< prev
next >
Wrap
Commodore BASIC
|
2022-08-26
|
5KB
|
148 lines
10 goto30
20 hi=int(nu/256):lo=nu-hi*256:return
30 ify=0theny=1:load"filecopy.o",8,1
40 poke51,.:poke56,47:clr:dim f$(100),t$(100),ea(100),sa(100)
45 dd%=9:close2:open2,9,15:close2:ifstthendd%=8
46 ifdd%=9thengosub2000
50 rb=1:gosub520:sa=12288
60 fl$="":f=32768
70 a=peek(f):ifa<>0thenfl$=fl$+chr$(a):f=f+1:goto70
80 iflen(fl$)>16thenfl$=left$(fl$,16)
90 open2,8,2,"files on side "+si$
100 input#2,a$:i=st:input#2,nf$:nf=val(nf$):input#2,nb$:nb=val(nb$)+1
110 forx=1tonf:input#2,f$(x),t$(x):next
120 nf=nf+1:f$(nf)="loadstar reader":t$(nf)="p"
130 ifa$<>fl$andi=0then100
140 ifa$=fl$then170
150 print"error....file "fl$" not found in file!":close2
160 stop
170 close2
180 print
190 print:poke198,.
200 :
210 :
220 d1=.
230 nu=sa:gosub20:d1=d1+1:d=d1:poke12131,hi:poke12135,lo:sa(d1)=sa
240 gosub670:print"[154]reading:"f$(d)
250 open1,8,2,f$(d):sys12040:close1
260 ea(d1)=peek(832)+peek(833)*256:sa=ea(d1)+1
270 if (ea(d1)<53248) and (d1<nf) then 230
280 if ea(d1)<53248 then 310
290 d1=d1-1:sa=12288:print"[150] "
300 print" "
310 ifdd%=9then340
315 print" insert destination disk... "
320 print" press space when ready to copy.":poke198,.
330 geta$:ifa$<>" "then330
340 ifrbthenprint" [129]checking # of blocks free"
350 ifrbthenrb=.:gosub790
360 d2=d2+1:d=d2:gosub670
370 print"[154]writing:"f$(d):gosub640
380 if(mm)then420
390 nu=ea(d2):gosub20:poke832,lo:poke833,hi
400 nu=sa(d2):gosub20:poke12131,hi:poke12135,lo
410 open1,dd%,2,f$(d)+","+t$(d)+",w":sys12084:close1
420 if d2<d1 then 360
430 ifdd%=9then460
435 print" insert [153]"dn$"..."
440 print" press space when ready to continue.":poke198,.
450 geta$:ifa$<>" "then450
460 gosub600:if(mm$<>dn$)thengosub710:goto460
470 print"[145][145]";:fora=1to2:print" ":next
480 print"[145][145][145]";:poke832,.:poke833,32
490 if d1<nf then 230
500 gosub1030:rem loading instructions
510 goto1310
520 poke53280,0:poke53281,0
530 printchr$(142)"[147][213][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][192][192][192][192][192][192][192][192][192][192][192][192][192][201]";
540 print"[221] loadstar program copier [221]";
550 print"[221] [154]by: mike maynard & alan gardner [221]";
560 print"[202][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][192][192][192][192][192][192][192][192][192][192][192][192][192][203]";
570 fora=217to242:pokea,peek(a)or128:next
580 gosub600:si$=right$(dn$,1):mm$=dn$
590 print" please wait five more seconds... ":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
640 open15,dd%,15,"r0:"+f$(d)+"="+f$(d):input#15,er:close15
650 mm=.:ifer=63thenmm=1
660 return
670 print"";:fora=1to20:print" ":next
680 return
690 print"[145][145][145][145][145][145]";:fora=1to6:print" "
700 next:print"[145][145][145][145][145]";:return
710 print"[145][145][159] "mm$"[154] is not in the drive."
720 print" "
730 print" put [159]"mm$" [154]in the drive and"
740 print" press space [154]to try again.":poke198,.
750 geta$:ifa$<>" "then750
760 print"[145][145][145][145]";:fora=1to4:print" ":next
770 print"[145][145][145]":return
780 rem check # of blocks free
790 open15,dd%,15,"i0":input#15,er:close15:if(er<20)or(er>24)then810
800 gosub670:print" the disk in the drive isn't formatted.":goto910
810 open15,dd%,15,"i0":open8,dd%,8,"#"
820 print#15,"ua:8 0 18 0":print#15,"b-p:8 4"
830 ba=.:fora=1to35:ifa=18thenget#8,a$:goto850
840 get#8,a$:ba=ba+asc(a$+chr$(.))
850 forb=1to3:get#8,a$:next
860 next:ifnb<bathenclose8:close15:return
870 close8:close15
880 gosub670:print"there's not enough room on this disk"
890 print"for [150]"f$(d)" and the files"
900 print"associated with it."
910 print"[158] your options:"
920 print"f[154]ormat a disk for this program"
930 print"t[154]ry saving this program on another disk"
940 print"q[154]uit (forget about copying it)
950 [153]"press fcont, tcont, or qcont.":[151]198,.
960 a[178][194](203):[139]a[179][177]21[175]a[179][177]22[175]a[179][177]62[167]960
970 [139]a[178]62[167][141]1250:[137]960
980 [139]a[178]22[167][153]" forchecking # of blocks free":[137]790
990 [153]"cont put disk to format in drive 0"
1000 [153]" press spacecont when ready to format":[151]198,.
1010 [161]a$:[139]a$[179][177]" "[167]1010
1020 [159]15,dd%,15,"n0:loadstar progs,mm":[160]15:[137]790
1030 [141]670:[153]" cont-- finished copying cont--"
1040 [153]"contto load this program from basic, enter:"
1050 [153]"load "[199](34)f$(1)[199](34)",8"
1060 [153]"on"[163]30)"contthen...":[153]"run"
1070 [153]"cont please make note of this..."
1080 [153]" press space contfor more"
1090 [139][194](203)[179][177]60[167]1090
1100 [141]670:[153]""
1110 [153]"contto read about this program from basic,"
1120 [153]"enter the following:"
1130 [153]"load "[199](34)"loadstar reader"[199](34)",8,1 contthen..."
1140 [153]"new contthen..."
1150 [153]"sys 679,"[199](34)"t."f$(1)[199](34)
1160 [153]"contuse pcont to pause, ccont to continue, and"
1170 [153]"acont to abort."
1180 [153]"cont please make note of this..."
1190 [153]" press space contto return to loadstar"
1200 [139][194](203)[179][177]60[167]1200
1210 [142]
1220 [159]3,8,3,"files on side 1"
1230 [129]i[178].[164]1:[161]#3,a$:i[178]st:[153]a$;
1240 [130]:[160]3
1250 [153]" contare you sure you want to quit? (ycont/ncont)":[151]198,.
1260 a[178][194](203):[139]a[179][177]25[175]a[179][177]39[167]1260
1270 [139]a[178]39[167][153]"on ":[153]"onon";:[142]
1280 [153]"contplace open"dn$" contin the drive and"
1290 [153]"press space contto return to loadstar":[151]198,.
1300 a[178][194](203):[139]a[179][177]60[167]1300
1310 [137]3000
2000 [153]"sys is drive 9 your destination? (y/n)"
2010 [161]a$:[139]a$[179][177]"y"[175]a$[179][177]"n"[167]2010
2020 [153]" "
2030 [139]a$[178]"n"[167]dd%[178]8
2040 [142]
3000 [151]45,135:[151]46,27:[151]47,142:[151]48,27:[151]49,142:[151]50,27:[151]51,0
3010 [151]52,128:[151]53,0:[151]54,0:[151]55,0:[151]56,128:[156]
60000 [159]15,8,15,"r0:hello connect=hello connect":[132]15,er:[160]15
60010 [139] er[179][177]63 [167] [153]"load":[128]
60020 a$[178]"hello connect":q$[178][199](34):[151]53281,7:[151]53280,7:[153]"load"
60030 [153]"sysload"q$a$q$",8"
60040 [153]"run":[151]631,13:[151]632,13:[151]198,2:[162]