home *** CD-ROM | disk | FTP | other *** search
- rem This is a homegrown version of the PWCONFIG program.
- rem Chip Weems 5/18/83; $lines added 4/10/84 by Don Davis
-
- $lines
- var num, I, J = integer
- var abyte, cursor, fill, tabs, indent, clock, ldelay, hdelay, fsize = char
- files D, D, S(1), S(1)
-
- print "You should have a copy of your old PW.SWP file on the"
- print "disk in drive A and a disk without a PW.SWP file (but"
- print "enough empty space to hold the new one) in drive B."
- print "You should also have read and understood the section"
- print "entitled 'Your Personal Preferences for Perfect Writer'"
- print "in appendix A of the Perfect Writer manual."
- print
- print "When you are ready to continue, press RETURN. Press any"
- print "other key to exit back to the operating system."
- input abyte
- if abyte<>chr(0DH) then
- call 0
-
- create "B:PW.SWP"
- open #3; "A:PW.SWP"
- open #2; "B:PW.SWP"
-
- print
- repeat
- begin
- print "Enter size of swap file in K (64 is normal)";
- input num
- if (num<24 or num>248) or num<>int(num/8)*8 then
- begin
- print
- print "File size must be between 24 and 248 (inclusive)"
- print "and a multiple of 8. On the Kaypro II the practical"
- print "maximum is 128, and the absolute maximum is 152."
- print
- end
- end
- until (num>=24 and num<=248) and num=int(num/8)*8
- let fsize = chr(num)
-
- repeat
- begin
- print "Enter initial display line for cursor (10 is normal)";
- input num
- if num<1 or num>24 then
- begin
- print
- print "The cursor display line must be in the range"
- print "1 through 24."
- print
- end
- end
- until num>=1 and num<=24
- let cursor = chr(num)
-
- repeat
- begin
- print "Enter fill column (65 is normal)";
- input num
- if num <1 or num>79 then
- begin
- print
- print "The fill column must be in the range"
- print "1 through 79."
- print
- end
- end
- until num>=1 and num<=79
- let fill = chr(num)
-
- repeat
- begin
- print "Enter tabs spacing (8 is normal)";
- input num
- let tabs = chr(num)
- if num<1 or tabs>=fill then
- begin
- print
- print "The tab spacing must be greater than 0"
- print "and less than the fill column."
- print
- end
- end
- until num>=1 and tabs<fill
-
- repeat
- begin
- print "Enter indent column (0 is normal)";
- input num
- let indent = chr(num)
- if num<0 or indent>=fill then
- begin
- print
- print "The indent column must be 0 or greater,"
- print "but less than the fill column."
- print
- end
- end
- until num>=0 and indent<fill
-
- repeat
- begin
- print "Enter CPU clock speed (4 is normal)";
- input num
- if num<=0 or num>32 then
- begin
- print
- print "The clock speed should be in the range"
- print "1 through 32. For the standard Kaypro II"
- print "it is 2. For the enhanced clock Kaypro II"
- print "it is 5. For the Kaypro 10 it is 4."
- print
- end
- end
- until num>0 and num<=32
- let clock = chr(num)
-
- repeat
- begin
- print "Enter delay count (300 is normal)";
- input num
- if num<=0 or num>32000 then
- begin
- print
- print "The delay count should be in the range"
- print "1 through 32000, although the range 100"
- print "through 1000 is recommended."
- print
- end
- end
- until num>0 and num<=32000
- let ldelay = chr(num - (int(num / 256) * 256))
- let hdelay = chr(int(num / 256))
-
-
- print "Building swap file part 1."
-
- for I = 0H to 74H
- read #3; abyte
- write #2; abyte
- next I
-
- print "Building swap file part 2."
-
- for I = 75H to 7CH
- read #3; abyte
- next I
- write #2; cursor, fill, tabs, indent, clock, ldelay, hdelay, fsize
-
- print "Building swap file part 3."
-
- for I = 7DH to 3FFH
- read #3; abyte
- write #2; abyte
- next I
-
- print "Building swap file part 4 (this will take awhile)."
-
- let abyte = chr(0)
- for I = 1 to fsize
- for J = 0H to 3FFH
- write #2; abyte
- next J
- print I;"K";chr(0DH);
- next I
-
- close #2
- close #3
- print "Done."
- end
- r delay count (300 is normal)";
-