home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Rockford Magazine
/
Rockford_Magazine_026_19xx_-_de_Disk_1_of_2_Side_B.d64
/
split.text
(
.txt
)
< prev
next >
Wrap
Commodore BASIC
|
2023-02-26
|
1KB
|
32 lines
10 rem copyright 1984 joel m. rubin--commercial rights reserved
20 rem split a big text file for wordprocessing
70 rem ** string thing (universal) **
80 rem ** jim butterfield **
90 rem string must be first variable
100 a$="abcdefghijklmnopq"
110 a$=a$+a$+a$+a$+a$
120 a$=a$+a$+a$
130 rem above sets string for max (255)
200 data 160,2,177,45,153,137,0,200,192,6
210 data 208,246,162,1,32,198,255
220 data 32,228,255,201,13,240,15,164,142,145
230 data 140,200,132,142,196,139,240,4,165,144,240,234,76,204,255
250 forj=896to937:readx:pokej,x:t=t+x:nextj
260 ift<>6120thenstop
400 print"[147]input file is on device 8,"
410 print"drive 0"
420 input"i/p file";fi$
430 open15,8,15,"i0"
440 open1,8,2,fi$+",s,r":input#15,a,b$,c,d:ifathenprinta;b$c;d:stop
450 input"output device 8[157][157][157]";od
460 input"output drive 0[157][157][157]";oe
470 open14,od,15:if(od<>8)oroethenprint#14,"i"+chr$(48+oe)
480 input"approx. bytes/o-p file";by
490 nf=0
500 open3,8,3,fi$+mid$(str$(nf),2)+",s,w":nb=0:print"[207]/[208] [198]ile #"nf
505 input#14,a,b$,c,d:ifa<>0thenclose2:printa;b$c;d:stop
510 sys896:l=peek(142):nb=nb+l:ss=st:print#3,left$(a$,l)
520 ifssthenclose1:close3:end
530 ifnb>bythenclose3:nf=nf+1:goto500
540 goto510