home *** CD-ROM | disk | FTP | other *** search
/ 8bitfiles.net/archives / archives.tar / archives / genie-commodore-file-library / C64Toolkit / DOSIT54.ARC / COPY (.txt) < prev    next >
Commodore BASIC  |  2019-04-13  |  7KB  |  216 lines

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