home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Transactor
/
Transactor_20_1987_Transactor_Publishing.d64
/
copy-all.64
(
.txt
)
< prev
next >
Wrap
Commodore BASIC
|
2023-02-26
|
2KB
|
86 lines
100 print"[147]disk copy-all jim butterfield"
110 a$="!jim butterfield!":a$=a$+a$+a$:a$=a$+a$+a$+a$+a$
120 p$=""
130 dim l2(232),l1%(232),n$(232),t%(232),t$(4)
140 data xxx,seq,prg,usr,rel
150 forj=0to4:readt$(j):nextj
160 input"from unit 8[157][157][157]";f
170 gosub830
180 f$=d$
190 input"to unit 9[157][157][157]";t
200 gosub830:t$=d$:ift=fandf$=t$thenrun
230 n=0:close1:close15:open 15,f,15:print#15,"i"+f$
240 gosub860:if e then stop:goto230
250 z=90:input"pattern *[157][157][157]";p$
260 p$="xxx"+left$(p$+"[160][160][160][160][160][160][160][160][160][160][160][160][160][160][160]",16)
270 print"hold down 'y' or 'n' key to select"
280 print"programs to be copied..."
290 open 1,f,3,"$"+f$
300 gosub860:ifethenstop:goto230
310 sys4156
320 r=255:goto 340
330 sys4245
340 forj=16to2step-1:ifasc(mid$(a$,j+3))=160thennextj
350 n$=mid$(a$,4,j)
360 t9=asc(a$)-128:ift9<1ort9>4goto470
370 l1%=asc(mid$(a$,22))
380 l2=asc(mid$(a$,29))+asc(mid$(a$,30))*256
390 printmid$(a$,4,16);" ";t$(t9)
400 p=peek(203)andr
410 getz$:ifz$=""andp<064goto450
420 ifz$="y"orz$="n"thenz=asc(z$):r=255:goto450
430 ifz$=chr$(13)thenr=0:goto450
440 goto410
450 ifz<80thenprint"[145] [145]":goto470
460 n=n+1:l2(n)=l2:n$(n)=n$:t%(n)=t9:l1%(n)=l1%
470 ifst=0andn<232goto330
480 close1:close15:print" * * * * *"
485 ifn=0thenprint"* no programs *":goto 800
490 forj=1ton
500 l2=l2(j):t%=t%(j):ifl>l2goto670
510 ifq=0goto550
520 print"*** output disk full"
530 input"do you have a new one";z$
540 ifasc(z$)<>89thenend
550 close15:open15,t,15:input"want to new the output disk n[157][157][157]";z$
560 ifasc(z$)<>89goto600
570 input"disk name,id";x$,y$
580 print#15,"n"+t$+":"+x$+","+y$
590 gosub860:ifethenstop:goto550
600 print#(NULL)5,"i"+t$:open1,t,0,"$"+t$+":!#$%&"
610 gosub860:ifethenstop:goto550
620 gosub890:gosub890:q=q+1
630 get#(NULL),x$:ifx$<>""goto630
640 gosub890
650 l=x+y*256:print"(";l;"blocks free )"
660 close1:close15:goto500
670 open14,f,15:open15,t,15
680 printleft$(n$(j)+" ",21);
690 open3,f,3,f$+":"+n$(j)+","+t$(t%)
700 gosub855:ifethenprint"** ";e$;e:goto780
710 ift%=4thenopen4,t,4,t$+":"+n$(j)+",l,"+chr$(l1%(j)):goto730
720 open4,t,4,t$+":"+n$(j)+","+t$(t%)+",w"
730 l=l-l2:gosub860:ifethenprint"*** ";e$;e:goto780
740 ift%=4thensys4462:gosub855:goto760
750 sys4443
760 n$(j)="":gosub860:ifethenprint"**** ";e$;e:goto780
770 print"[145]"
780 close4:close3:close15:close14
790 nextj
800 x=fre(0):input"another input disk ready";z$
810 ifasc(z$)=89goto230
820 end
830 input"drive 0[157][157][157]";d
840 ifd*d<>dgoto830
850 d$=chr$(d+48):return
855 input#14,e,e$,e1,e2:goto870
860 input#15,e,e$,e1,e2
870 ife=0thene=(st and 191):e$="*st*"
880 return
890 get#1,x$
900 get#1,x$
910 get#1,x$
920 x=asc(x$+chr$(0))
930 get#1,x$:y=asc(x$+chr$(0))
940 return