REM FILE NAME = "NEWSWAP.BAS"
REM SBASIC PROGRAM TO RECONFIGURE PW.SWP SIZE

BEGIN
VAR HOWBIG,I,J = INTEGER
VAR ONECHAR = CHAR
FILES S(2),S(2)
CREATE "B:PW.SWP"
OPEN #1;"A:PW.SWP"
OPEN #0;"B:PW.SWP"
PRINT "DESIRED SIZE FOR SWAP FILE IN K'S";
INPUT HOWBIG
PRINT
FOR I = 0H TO 7BH
       READ #1; ONECHAR
       WRITE #0; ONECHAR
NEXT I
       READ #1; ONECHAR
       ONECHAR = CHR(HOWBIG)
       WRITE #0; ONECHAR
FOR I = 7DH TO 3FFH
       READ #1; ONECHAR
       WRITE #0; ONECHAR
NEXT I
LET ONECHAR = CHR(0)
FOR I = 1 TO HOWBIG
          FOR J = 0H TO 3FFH
                    WRITE #0; ONECHAR
          NEXT J
          PRINT I; "K"; CHR(0DH)
NEXT I
CLOSE #0
CLOSE #1
PRINT "AT LAST!"
END

@STYLE(LEFTMARGIN 8 CHARS, RIGHTMARGI