home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Compute! Gazette 1985 August
/
1985-08.d64
/
redisk
(
.txt
)
< prev
next >
Wrap
Commodore BASIC
|
2022-09-20
|
2KB
|
36 lines
0 poke55,0:poke56,peek(44)+8:clr:print"[147]redisk[146]":p=880
1 f1=53247:f2=1:f$=" [145]"
2 reada:ifa>-1thenpokep,a:p=p+1:goto2
3 poke909,(f1+1)/256:poke917,f2:poke950,f2:poke881,peek(56):poke919,peek(56)
4 print"do you want to format the dest. disk n[157][157][157]";:inputa$
5 open15,8,15:ifright$(a$,1)="y"then19
6 print"name,type (prg or seq) of file to copy.":inputp$,t$:print
7 t$=left$(t$,1):if(t$<>"p"andt$<>"s")orlen(p$)>16thenprint"[145][145][145]":goto6
8 m$="insert source disk":gosub23:pt$="0:"+p$+","+t$+",r"
9 poke1000,len(pt$):forx=1tolen(pt$):poke827+x,asc(mid$(pt$,x,1)):next
10 sys958:sys982:sys880:p=peek(247)+256*peek(248):close5:gosub27
11 ifp>f1thenprint"file has overflowed the buffer.":goto17
12 print"file is now loaded into buffer."
13 print"enter new file name.":print""+p$:input"[145]";p$:print
14 m$="insert destination disk":gosub23:pt$="@0:"+p$+","+t$+",w"
15 poke1000,len(pt$):forx=1tolen(pt$):poke827+x,asc(mid$(pt$,x,1)):next
16 sys958:sys989:sys914:open15,8,15:gosub27:print"file is now copied."
17 close15:open15,8,15:close15:input"another file";a$
18 on-(left$(a$,1)="y")goto4:print"[147]":end
19 print"name,id of disk to be formatted":inputp$,t$:print
20 m$="insert destination disk":gosub23
21 print"formatting disk":print#15,"n0:"+p$+","+t$
22 gosub27:print"disk formatted":goto6
23 printm$"[145]":fort=0to50:geta$:on-(a$<>"")goto25:next
24 printf$:fort=0to50:geta$:on-(a$<>"")goto25:next:goto23
25 ifa$=chr$(13)thenprint:return
26 goto23
27 input#15,a$,b$,c$,d$:ifb$="ok"thenreturn
28 print:printa$","b$"[146],"c$","d$:print"try again.":goto17
29 data 160,16,132,248,160,0,132,247,32,207,255,145,247,200,240,8,32,183,255
30 data 240,243,132,247,96,230,248,165,248,201,208,208,240,96,234,169,54,133
31 data 1,160,16,132,254,160,0,132,253,177,253,32,210,255,200,240,18,196,247
32 data 208,244,166,254,228,248,208,238,32,231,255,169,55,133,1,96,230,254,76
33 data 166,3,234,169,5,162,8,160,5,32,186,255,173,232,3,162,60,160,3,32,189
34 data 255,32,192,255,96,234,162,5,32,198,255,96,234,162,5,32,201,255,96,-1