8-Bit Software Online Conversion
ASCII File Splitter - Listing
10 DEFFNS="Split"
20 ONERROR CLOSE#0:REPORT:PRINTERL:EN
D
30 MODE7
40 VDU23;8202;0;0;0;
50 PRINT'TAB(8)"
60 PRINTTAB(8)"
70 PRINT'TAB(10)" By C.J.Richardson."
80 PRINT'TAB(9)" For 8-Bit Software."
90 PRINT'" 17 Lambert Park Road"
100 PRINT" Hedon"
110 PRINT" Hull"
120 PRINT" HU12 8HF"
130 PRINT'" Splits up a large ASCII te
xt file"
140 PRINT" into smaller files. Copy th
e file"
150 PRINT" to be split to a blank disc
first."
160 PRINT''" Press a key "
170 REPEATUNTILGET
180 CLS
190 *.
200 INPUT''" File to split up? "filena
me$
210 PRINT''" Number of bytes in each n
ew file?"
220 PRINT" 8100 is a reasonable figure
"
230 INPUT S%
240 PRINT''" Please wait"
250 F%=OPENIN filename$
260 C%=1
270 G%=OPENOUT (STR$C%)
280 B%=BGET#F%
290 BPUT#G%,B%
300 FOR L%=1 TO EXT#F%
310 IF PTR#G%=S%:CLOSE#G%:C%=C%+1:G%=O
PENOUT (STR$C%)
320 B%=BGET#F%
330 BPUT#G%,B%
340 NEXT
350 CLOSE#F%
360 CLOSE#G%
370 PRINT'" ";filename$;" has been cop
ied into filenames:"
380 PRINT'" 1 to ";STR$C%
390 END