home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
8bitfiles.net/archives
/
archives.tar
/
archives
/
genie-commodore-file-library
/
C64Toolkit
/
SPYNE.SDA
/
SPLICE
(
.txt
)
< prev
next >
Wrap
Commodore BASIC
|
2019-04-13
|
4KB
|
70 lines
10 POKE45,172:POKE46,23
20 POKE55,.:POKE56,63:CLR:FV=1:Z$=CHR$(.):M$=CHR$(13):PRINT"[147][142]"
30 PRINT"ENTER DISK DRIVE DEVICE NUMBER."
40 PRINT"(ENTER 0 TO EXIT.)"
50 PRINT:PRINT" 8[145]":INPUTD:IFD=0THEN950
60 IFD<4ORD>30THENPRINT"[147]ILLEGAL DEVICE NUMBER":GOTO30
70 POKE2,35:POKE184,8:POKE185,0:POKE186,D
80 POKE183,1:POKE187,2:POKE188,.:SYS65472
90 CLOSE8:IFPEEK(783)AND1THENPRINT"[147]?DEVICE";D;"[157] NOT PRESENT":GOTO30
100 OPEN15,D,15:GOSUB600:IFA>19THENCLOSE15:PRINT:GOTO30
110 GOTO800
120 OPEN8,D,0,"$"
130 PRINT"[147][146][142]LOADING DISK DIRECTORY..."
140 SYS4495:IFPEEK(2)THEN160
150 PRINT"[147]NO FILES ON DISK":CLOSE15:GOTO30
160 IFPEEK(829)ANDPEEK(831)THEN180
170 PRINT"[147]FEWER THAN TWO FILES IN QUEUE":CLOSE15:GOTO30
180 PRINT"ONE MOMENT PLEASE... ";
190 SYS5351:GOSUB500
195 FORI=1TOPEEK(183):N$=N$+CHR$(PEEK(PEEK(187)+256*PEEK(188)+I-1)):NEXT
200 SYS5383:GOSUB500:SYS5458
210 SYS5436:IFFVTHENGOSUB500:SYS5458:GOTO210
220 PRINT"...DONE. VALIDATING DISK... "
222 GOSUB600
224 PRINT"TO RENAME THE FILE, ENTER NEW FILENAME."
225 PRINT"(PRESS RETURN TO KEEP OLD FILENAME)."
226 PRINT"OLD FILENAME: ";N$;""
227 F$="":INPUTF$:IFF$=""THEN240
228 PRINT#15,"R0:";F$;"=";N$
240 CLOSE8:CLR:FV=1:Z$=CHR$(.):M$=CHR$(13):N$="":PRINT"[147]":GOTO30
500 POKE190,.:PRINT#15,"M-R";CHR$(144);CHR$(2);CHR$(5)
510 GET#15,A$:POKE141,ASC(A$+Z$)
520 GET#15,A$:GET#15,A$:GET#15,A$
530 GET#15,A$:POKE142,ASC(A$+Z$)
540 RETURN
600 INPUT#15,A,B$,C,E
610 IFA>19THENPRINT"[147]";A:PRINT:PRINTB$:PRINT:PRINTC,E:PRINT:RETURN
620 PRINT"[147]":RETURN
800 Q$=CHR$(34):PRINT"[212]HIS PROGRAM WILL LET YOU SPLICE UP TO"
805 PRINT"10 FILES TOGETHER. [217]OU NEED NOT HAVE"
810 PRINT"ANY FREE BLOCKS ON THE DISK, AND THE"
815 PRINT"FILES MAY BE OF ANY SIZE. [212]HE [196][207][211] ";Q$;"[195]0";Q$
820 PRINT"(CONCATENATE) COMMAND REQUIRES ENOUGH"
825 PRINT"FREE BLOCKS TO HOLD THE SPLICED FILE."
830 PRINT"[207]F COURSE, AFTER YOU USE THIS PROGRAM,"
835 PRINT"YOU WON'T HAVE THE ORIGINAL FILES ON"
837 PRINT"YOUR DISK. [212]HE FILENAME OF THE SPLICED"
838 PRINT"FILE WILL BE THE SAME AS THAT OF THE"
840 PRINT"FIRST OF THE ORIGINAL FILES."
845 PRINT" [208][210][197][211][211] [210][197][212][213][210][206][146]";
850 GETA$:IFA$=M$THEN860
855 GOTO850
860 PRINT"[147][215]HEN YOU PRESS [210][197][212][213][210][206], YOU WILL BE ABLE"
865 PRINT"TO STEP THROUGH THE DIRECTORY ENTRIES."
870 PRINT"[211]ELECT THE FIRST FILE IN THE SERIES AND"
875 PRINT"PRESS [210][197][212][213][210][206] TO ENTER IT. [211]ELECT THE"
880 PRINT"NEXT FILE AND PRESS [210][197][212][213][210][206] TO ADD IT TO"
885 PRINT"THE QUEUE, AND SO ON. [193]T ANY TIME, YOU"
890 PRINT"MAY PRESS ";Q$;"C";Q$;" TO CLEAR THE QUEUE,"
895 PRINTQ$;"D";Q$;" TO DELETE THE LAST ENTRY, OR"
900 PRINTQ$;"S";Q$;" TO SPLICE THE FILES TOGETHER (WHEN"
905 PRINT"YOU ARE DONE). [212]O START OVER,"
907 PRINT"PRESS ";Q$;"S";Q$;" WITH NO FILES IN THE QUEUE."
910 PRINT" [[208]RESS [210][197][212][213][210][206] TO PROCEED]"
915 PRINT" [[208]RESS ";Q$;"X";Q$;" TO EXIT]";
920 GETA$:IFA$=M$THEN120
925 IFA$="X"THEN950
930 GOTO920
950 PRINT"[147][142]":POKE56,160:END