8-Bit Software Online Conversion
File Splitter - Listing
10DEFFNS="Split"
20MODE128
30HIMEM=&2000
40PRINT'"File Splitter By C.J.Richard
son For 8-Bit Software."'
50*.
60PRINT'"Filename to split:"
70INPUT J$
80F%=OPENIN J$
90PRINT'"Name of parts: "
100INPUT J$
110B%=&900
120C%=0
130REPEAT
140PROCld
150C%=C%+1
160C$=J$+STR$ (C%)
170G%=OPENOUT C$
180PROCsv
190CLOSE#G%
200UNTILEOF#F%
210CLOSE#F%
220PRINT'"Done!"'"Parts are named from
";J$;"1 To ";C$
230END
240DEFPROCld
250IF EXT#F%-PTR#F%>&4FFF H%=&5000 ELS
E H%=EXT#F%-PTR#F%
260A%=4
270X%=B% MOD 256
280Y%=B% DIV 256
290B%?0=F%
300B%!1=&2000
310B%!5=H%
320CALL&FFD1
330T%=0
340IF PTR#F%=EXT#F% ENDPROC
350S%=&6FFF
360D%=0
370REPEAT
380D%=D%+1
390S%=S%+1
400T%=T%+1
410R%=BGET#F%
420?S%=R%
430UNTIL?S%=13 OR ?S%=10 OR D%=80
440ENDPROC
450DEFPROCsv
460A%=2
470X%=B% MOD 256
480Y%=B% DIV 256
490B%?0=G%
500B%!1=&2000
510B%!5=H%+T%
520CALL&FFD1
530ENDPROC