💾 Archived View for mirrors.apple2.org.za › archive › apple.cabi.net › Utilities › splitter.txt captured on 2024-02-05 at 11:47:11.
⬅️ Previous capture (2023-01-29)
-=-=-=-=-=-=-
NEW 10 REM ***************************** ---> UPLOADED FROM 20 REM * PRODOS TEXT FILE SPLITTER * APPLE'S ONLINE! 30 REM * A PUBLIC DOMAIN PROGRAM * 24 HOURS 40 REM * BY LARRY MILLER * 1-718-746-1140 50 REM ***************************** 60 D$ = CHR$(4):T=0:N=0:A=0:A$=" ":B=0:I=0:C$=" " 70 HOME: VTAB 10:? "PLACE THE DISK WITH THE FILE TO BE":?"SPLIT IN DRIVE 1" 75 ?:?"PRESS <RETURN> TO CONTINUE":CALL 64858 80 ?D$;"PREFIX,D1" 90 ?D$;"PREFIX" 100 INPUT PF$ 110 HOME:VTAB 10:?" ENTER THE NAME OF THE" 120 ?:?" TEXT FILE TO BE SPLIT ":?:INPUT " ";FI$ 125 F=LEN(FI$) 130 ?D$;"OPEN ";PF$;",TDIR" 140 ?D$;"READ ";PF$ 150 INPUT F$ 160 INPUT F$ 170 INPUT F$ 180 INPUT F$ 190 IF MID$(F$,2,F) = FI$ AND MID$(F$,F+2,1) = " " THEN L =VAL(MID$ (F$,64,8)) 200 IF F{body}lt;>"" THEN GOTO 180 210 INPUT F$:F=VAL(MID$(F$,13,5)) 220 ?D$;"CLOSE ";PF$ 230 IF L=0 THEN GOTO 1000 240 F=(F+6)*512 250 IF F<L THEN GOTO 2000 255 C1$=LEFT$(FI$,13) 260 L2=INT(L/2):L3=INT(L/3):L4=INT(L/4) 270 ?D$;"FRE" 280 A=PEEK(109)+PEEK(110)*256 290 T=PEEK(111)+PEEK(112)*256 300 HOME:VTAB10:?"YOU MAY SPLIT ";FI$;" INTO:" 310 IF T-A-3>L2 THEN?"2 PIECES OF ABOUT ";L2;" BYTES" 320 IF T-A-3>L3 THEN?"3 PIECES OF ABOUT ";L3;" BYTES" 330 IF T-A-3>L4 THEN?"4 PIECES OF ABOUT ";L4;" BYTES" 340 IFT-A-3<L4 THEN?FI$;" TOO LONG FOR THIS PROGRAM":goto 550 350 ?:?"HOW MANY PIECES? ":POKE 49168,0:GET A$:? 360 N=VAL(A$) 370 ON N GOTO 300,400,400,400 380 GOTO 300 400 IF N=2 AND T-A-3<L2 THEN GOTO 300 410 IF N=3 AND T-A-3<L3 THEN GOTO 300 420 IF N=3 THEN L2=L3 430 IF N=4 THEN L2=L4 440 HOME:VTAB10:?"SPLITTING ";FI$ 450 FOR I = 1 TO N 460 C$=C1$+"."+STR$(I) 470 ?D$;"CREATE ";C$;",TTXT" 480 ?D$;"FRE" 490 IF I=N THEN L2=L-B 500 ?D$;"BLOAD ";FI$;",A";A;",L";L2;",B";B;",TTXT" 510 ?D$;"BSAVE ";C$ ;",A";A;",L";L2;",TTXT" 520 B=B+L2 530 NEXT I 540 HOME:VTAB10:?FI$;" SPLIT INTO ";N;" PIECES." 550 ?D$;"PREFIX /":END 1000 HOME: VTAB 10:?"I CAN'T FIND ";FI$;" OR IT IS AN EMPTY FILE" 1010 ?:?"WOULD YOU LIKE TO TRY AGAIN? Y OR N": 1020 POKE 49168,0:GET A$:?:IF A$="Y" THEN GOTO 110 1030 GOTO 550 2000 HOME:VTAB 10 :?"THERE IS NOT ENOUGH ROOM ON THIS DISK" 2010 ?:?"MOVE ";FI$;" TO ANOTHER DISK OR":?"DELETE FILES FROM THIS DISK" 2020 GOTO 550 SAVE SPLITTER