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 >
Commodore BASIC  |  2023-02-26  |  1KB  |  32 lines

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