home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
8bitfiles.net/archives
/
archives.tar
/
archives
/
genie-commodore-file-library
/
C64Toolkit
/
DOSIT54.ARC
/
COPY
(
.txt
)
< prev
next >
Wrap
Commodore BASIC
|
2019-04-13
|
7KB
|
216 lines
0 REM DOSIT-COPY6.3 **************
1 Q$=CHR$(34)
2 PRINT"[147]":POKE53265,27
10 CLR:PRINT"[147]";:DIMN$(300),F$(300):GOSUB700:GOTO800
15 PRINT"[147]"
20 POKE53280,.:POKE53281,.:PRINT""
60 PRINT"","[196]RIVE TO [196]RIVE [195][207][208][217]":PRINT,"[163][183][184][183][163] [163][163] [163][183][184][183][163] [163][183][183][163]"
70 DR=.:FORX=8TO11:POKE144,.:OPEN1,X,15:GOSUB100:IFZ<0THEN90
80 CLOSE1:OPEN1,X,15,"UI":INPUT#1,A$,B$,C$,D$:U(DR)=X:U$(DR)=RIGHT$(B$,4):DR=DR+1
90 CLOSE1:NEXTX:GOTO110
100 POKE144,.:POKE780,X:SYS65457:POKE780,111:SYS65427:SYS65448:Z=ST:SYS65454:RETURN
110 IFDR<2THENPRINT"[217]OU ONLY HAVE 1 DRIVE HOOKED UP!":FORI=1TO500:NEXT1:RUN
120 PRINT"[196]RIVES ONLINE:":PRINT
130 FORX=0TODR-1:PRINT""U$(X)" DRIVE, UNIT #"MID$(STR$(U(X)),2)".":NEXTX
140 PRINT:PRINT"[197]NTER [211]OURCE [213][206][201][212] #>";:GOSUB150:GOTO200
150 GOSUB190:IFVAL(A$)<8ORVAL(A$)>12THENGOSUB180:GOTO150
160 FORX=0TODR:IFVAL(A$)<>U(X)THENNEXTX:GOSUB180:GOTO150
170 V=VAL(A$):RETURN
180 FORX=2TOLEN(A$):PRINT" ";:NEXTX:FORX=2TOLEN(A$):PRINT"[157]";:NEXTX:RETURN
190 X=PEEK(211):OPEN1,.:INPUT#1,A$:PRINT:CLOSE1:PRINT"[145]"SPC(X);:RETURN
200 SO=X:IFDR=2THENDE=-X+1:PRINT:PRINT:PRINT"[196]ESTINATION [196]RIVE: "U$(DE)" [213][206][201][212]#:"U(DE):GOTO230
210 PRINT:PRINT"[197]NTER [196]ESTINATION [213][206][201][212] #>";
220 GOSUB150:DE=X:IFSO=DETHEN220
230 PRINT:PRINT"[201]NSERT [196]ISKETTES AND [208]RESS [210][197][212][213][210][206]":POKE198,.
240 GETA$:IFA$<>CHR$(13)THEN240
250 FORX=0TODR-1:OPEN1,U(X),15,"I0":CLOSE1:NEXTX
260 PRINT"[147][210]EADING [196]IRECTORY."
270 IFU$(DE)="1581"THENU81=U(DE):OPEN1,U(DE),15,"/":CLOSE1:GOSUB20000
271 IFU$(SO)="1581"THENU81=U(SO):OPEN1,U(SO),15,"/":CLOSE1:GOSUB20000
280 GOSUB30000:IFFI=.THENPRINT,"[206]O FILES!":FORDL=0TO3000:NEXTDL:RUN
290 GOSUB1000
300 REM COPY ROUTINE ************
301 PRINT"[147] COPYING" :FORQ=0TO1200:NEXT:POKE53265,11
310 FORFZ=0TOFI
320 IFLEFT$(N$(FZ),1)<>"[157]"THEN 375
340 N$(FZ)=RIGHT$(N$(FZ),(LEN(N$(FZ))-1))
360 CLOSE2:CLOSE1:OPEN2,U(DE),4,N$(FZ)+","+F$(FZ)+",W"
370 OPEN1,U(SO),4,N$(FZ)+","+F$(FZ)+",R":GOSUB500:CLOSE2:CLOSE1
375 NEXTFZ:POKE53265,27
380 PRINT," [198]ILES COPIED.":PRINT:PRINT,"[208]RESS A [211]PACE[146] TO RESTART"
381 PRINT" [196][146] FOR A DESTINATION DISK DIRECTORY"
382 GETG$:IFG$=""THEN382
383 IFG$=" "THEN RUN
384 IFG$<>"D"THEN 382
390 PRINT"[147]"
400 CLOSE1:OPEN1,U(DE),0,"$":GET#1,A$,A$
410 GET#1,L$,L1$:IFST=64THENCLOSE1:GOTO445
415 GET#1,LB$:GET#1,HB$:LN=ASC(LB$+CHR$(0))+256*ASC(HB$+CHR$(0)):PRINTTAB(6)LN;
420 GET#1,A$:IFA$=""THENPRINTCHR$(13);:GOTO410
430 PRINTA$;:GOTO420
445 GETA$:IFA$<>""THENRUN
446 GOTO445
450 GOSUB 550
460 PRINT">"; :N$=""
465 GETA$:IFA$=""THEN465
466 IFA$=""THENN$=LEFT$(N$,LEN(N$)-1)
470 PRINTA$;: IF A$=CHR$(13)THEN480
475 N$=N$+A$:GOTO465
480 OPEN15,U(DE),15,N$:CLOSE15:GOTO800
500 PRINT:PRINT" [195]OPYING: "N$(FZ):PRINT,,,"[145][157][157][198]ILE [212]YPE:"F$(FZ)
510 SYS49240:RETURN
550 REM INPUT DEVICE NO. ROUTINE
560 INPUT" DEVICE NUMBER";U(DE)
570 IFU(DE)<8 OR U(DE)>12 THEN PRINT"[145][145][145]":GOTO560
580 RETURN
600 IFA$="00"THEN360
610 PRINT:PRINT"[194]AD [196]ISK.....":PRINT:PRINT"[212]RY [193]GAIN?":GOTO340
700 IFPEEK(49152)<>166THENX=PEEK(186):GOSUB49000
710 RETURN
800 POKE646,1: POKE53280,6 :POKE53281,6:PRINT"[158]";:REM MENU
801 PRINT"";
802 PRINT"[176][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][174][146]";
803 PRINT"[221][146] [176][192][192][174] [176][192][192][174] [176][192][192][174] [178] [178] [221][146]";
804 PRINT"[221][146] [196][207][211][201][212] [192][192][192] [221] [221] [221] [221] [221] [221] [221] [221][146]";
805 PRINT"[221][146] [221] [221] [221] [171][192][192][189] [173][178][189] [221][146]";
806 PRINT"[221][146] [173][192][192][189] [173][192][192][189] [177] [177] [221][146]";
807 PRINT"[173][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][189][146]"
808 PRINT" $ DIRECTORY
809 [153]" P PRINT DIRECTORY
810 PRINT" C COPY
811 [153]" S SCRATCH
812 PRINT" / CREATE PARTITION
813 [153]" > DISK FUNCTION
814 PRINT"[197] EXIT TO DOSIT"
820 GETA$:IFA$=""THEN820
825 IFA$="$"THEN:GOSUB550:POKE53281,13:POKE53280,5:PRINT"[147]":GOTO 390
830 IFA$="P"THENGOSUB550:PRINT"[147][144]":POKE53280,15:POKE53281,15:GOTO950
835 IFA$="C"THEN PRINT"[154]":POKE53280,14:POKE53281,6:GOTO15
840 IFA$="S"THEN GOSUB550: POKE53280,2:POKE53281,15: PRINT"[147]":GOTO900
845 IFA$="/"THEN PRINT"[147][154]":POKE53280,14:POKE53281,6:GOSUB550: GOTO2000
847 IFA$="E"THENGOTO1500
850 IFA$=">"THEN 450
870 GOTO820
900 OPEN1,U(DE),0,"$":GET#1,A$,B$:GOSUB30010:GOSUB1000
910 OPEN15,U(DE),15: FOR N=0TOFI-1
920 IFLEFT$(N$(N),1)<>"[157]"THEN 940
925 N$(N)=RIGHT$(N$(N),LEN(N$(N))-1OR0)
930 PRINT#15,"S0:"+N$(N)
940 NEXT:CLOSE15:RUN
950 OPEN1,U(DE),0,"$":GET#1,A$,B$:GOSUB30010:GOSUB1000
960 CLOSE4:OPEN4,4,6:PRINT#4,N$(0):FORN=1TOFI-1
970 IFLEFT$(N$(N),1)<>"[157]"THEN 990
980 PRINT#4,F$(N),RIGHT$(N$(N),LEN(N$(N))-1)
990 NEXT:CLOSE4:RUN
1000 REM SELECTOR ********
1010 P=0:T$=" ":E=FI
1020 PRINT"[147][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][192][192]";
1021 PRINT" B BEGIN (+-) PAGING CURSORS U/D ";
1022 PRINT"[192][192][192][192][192] SPACE OR RETURN TO SELECT [192][192][192][192][192][146]";
1040 PRINT" PAGE";P/19+1 :PRINT
1050 FORV=0TO18:PRINTT$;N$(P+V):NEXT:V=0:PRINT"":PRINTT$;""N$(P+V)
1060 GETA$
1070 IFA$=""ANDV<>0THENPRINT"[145]"T$;N$(P+V):V=V-1:PRINT"[145][145]"T$""N$(P+V)
1075 IFA$="[145]"ANDV<>0THENPRINT"[145]"T$;N$(P+V):V=V-1:PRINT"[145][145]"T$""N$(P+V)
1080 IFA$=""ANDV<>18AND(P+V)<E-1THENPRINT"[145]"T$;N$(P+V):V=V+1:PRINTT$;""N$(P+V)
1090 IFA$="+"ANDP<E-18THENP=P+19:GOTO1020
1100 IFA$="-"ANDP<>0THENP=P-19:GOTO1020
1110 IFA$=" "ORA$=CHR$(13)THEN GOSUB1140
1120 IF A$="B"THENRETURN
1130 GOTO1060
1140 REM MARK FILE NAME --------------
1150 N$=N$(P+V)
1160 IFLEFT$(N$,1)="[157]"THENN$=RIGHT$(N$,LEN(N$)-1):GOTO1180
1170 IFLEFT$(N$,1)<>"[157]"THENN$="[157]"+N$
1180 PRINT"[145]"T$""N$"[146] ":N$(P+V)=N$
1185 IFA$=CHR$(13)ANDV<>18ANDP+V+1<>E THENPRINTT$"[145]"N$:V=V+1:PRINTT$""N$(P+V)
1190 RETURN
1500 PRINT"[145]INSERT DOSIT DISK AND PRESS ANY KEY":GETA$:IFA$=""THEN1500
1501 POKE53265,11:PRINT"[147]LOAD"+CHR$(34)+"DOSBOOT"+CHR$(34)+",8,1[145][145][145][145]"
1502 PRINTCHR$(142):POKE816,165
1505 POKE631,13:POKE632,82:POKE633,85:POKE634,78:POKE635,13:POKE198,5:END
2000 REM PARTITIONER
2020 PRINT"[147] PARTITIONER"
2030 PRINT"INPUT PARTITION NAME-" ;
2040 INPUT N$ :N$=N$+","
2050 INPUT"STARTING TRACK";T
2060 S=0
2070 PRINT"NUMBER OF TRACKS (40 BLOCKS PER TRACK)":INPUT I:I=(I+1)*40
2080 PRINT" WORKING "
2090 GT=INT(I/256):LT=I-GT*256
2110 OPEN15,U(DE),15
2120 PRINT#15,"/0:"+N$+CHR$(T)+CHR$(S)+CHR$(LT)+CHR$(GT)+",C"
2140 PRINT"[147] DONE " :GOSUB2330
2150 PRINT" FORMAT PARTITION?"
2180 INPUT"SUBDIRECTORY ID.";A$
2190 IF LEN(A$)>2THENPRINT"[145][145] ":GOTO2180
2200 OPEN15,U(DE),15,"/0:"+N$
2210 PRINT#15,"N0:"+N$+","+A$
2220 PRINT#15,"/" :CLOSE15
2230 GOSUB2330:GOTO800
2330 CLOSE15: OPEN15,U(DE),15
2340 INPUT#15,E1,E2$,E3,E4
2350 IFE1=0THENCLOSE15:RETURN
2360 PRINT" ERROR [146]"E1;E2$,E3,E4
2370 PRINT#15,"I"
2380 CLOSE15:GOTO800
10000 SYS49152:F$="":IFPEEK(702)THENFORX=0TOPEEK(702)-1:F$=F$+CHR$(PEEK(704+X)):NEXTX
10010 BS=PEEK(700)+PEEK(701)*256: RETURN
15000 IFBS>.ANDF$>""THENPRINT;TAB(14);F$;TAB(32)CHR$(PEEK(703))
15010 BS=.:RETURN
20000 OPEN1,U81,0,"$:*=C":GET#1,A$,A$:OK=.:PRINT
20010 GOSUB10000:IFBS=.THEN20010
20020 GOSUB15000:IFST=0THEN20010
20030 CLOSE1:IFOK=1THENRETURN
20040 CLOSE1:PRINT:PRINT"[197]NTER [196][201][210][197][195][212][207][210][217] OF [195][200][207][201][195][197]> ROOT[157][157][157][157]";
20050 OPEN1,.:INPUT#1,A$:PRINT:CLOSE1:IFRIGHT$(A$,1)="[221]"THENA$=LEFT$(A$,LEN(A$)-1)
20060 IFRIGHT$(A$,1)=" "THENA$=LEFT$(A$,LEN(A$)-1):GOTO20060
20070 IFA$=""THENPRINT"[145][145][145]":GOTO20040
20080 IFA$="ROOT"THENRETURN
20090 OPEN1,U81,15,"/0:"+A$:INPUT#1,A$,B$,C$,D$:CLOSE1:IFA$<>"62"THEN20000
20100 PRINT:PRINT"[206]OT FOUND!!!!!!!![145][145][145][145]":GOTO20040
30000 OPEN1,U(SO),0,"$":GET#1,A$,A$:OK=.:PRINT:FI=.
30010 GOSUB10000:IFBS=.ORPEEK(703)=82THEN30010
30020 IFST=0THENGOSUB30040:GOTO30010
30030 CLOSE1:RETURN
30040 N$(FI)=F$:F$(FI)=CHR$(PEEK(703)):FI=FI+1
30050 IFG$="D"THEN PRINTBS,F$,F$(FI)
30060 RETURN
49000 REM ML STUFF ********
49010 D=49152:GOSUB63997 :RETURN
49152 DATA166,184,32,198,255,32
49158 DATA228,255,32,228,255,32
49164 DATA228,255,141,188,2,32
49170 DATA228,255,141,189,2,165
49176 DATA144,208,53,32,228,255
49182 DATA201,34,208,245,162,0
49188 DATA165,144,208,40,32,228
49194 DATA255,240,29,201,34,240
49200 DATA8,157,192,2,232,224
49206 DATA17,48,235,165,144,208
49212 DATA19,32,228,255,41,127
49218 DATA201,33,48,243,141,191
49224 DATA2,138,141,190,2,76
49230 DATA204,255,169,0,240,246
49236 DATA0,0,0,0,169,0
49242 DATA133,247,133,249,169,193
49248 DATA133,248,133,250,162,1
49254 DATA32,198,255,32,228,255
49260 DATA160,0,145,247,230,247
49266 DATA208,2,230,248,164,144
49272 DATA208,6,165,248,201,208
49278 DATA208,233,132,254,32,204
49284 DATA255,162,2,32,201,255
49290 DATA160,0,165,247,197,249
49296 DATA208,6,165,248,197,250
49302 DATA240,13,177,249,32,210
49308 DATA255,230,249,208,233,230
49314 DATA250,208,229,32,204,255
49320 DATA165,254,41,64,240,170
49326 DATA76,204,255,0,0,0
49332 DATA0,0,0,0,0,0,-1
63996 END:REM R&P ROUTINE.FIRST SET D=TO DEST THEN GOSUB 63997
63997 D%=D/256:POKE254,D%:POKE253,D-D%*256:READ A:POKE D,A
63998 SYS PEEK(46)*256+PEEK(45)- 118 :RETURN:REM FIND 1ST BYTE OF M/L
63999 REM"[230][253][208][230][254][160][255][200][132]b[132]c[132]d[230]A[208][230]B[177]A[208][165]Ai[133]A[144],[230]B[208]([234][201],[240]#[201] [240][224][201]-[208][165]Ai[133]A[144][230]B`8[233]0[166]c[134]b[166]d[134]c[133]d[176][193][162]d[165]b[240] [201][240][162][200][138][133]b[165]c[240][162] ec[202][208][250]ebed[145][253][144][141]