home *** CD-ROM | disk | FTP | other *** search
/ CP/M / CPM_CDROM.iso / enterprs / cpm / utils / f / pwtour.arc / PWCONFG3.DOC < prev    next >
Encoding:
Text File  |  1993-03-27  |  3.9 KB  |  82 lines

  1. @STYLE(linewidth 41 characters)@BEGIN(text)
  2. A HOMEGROWN PWCONFIG
  3.  
  4.     Have you found yourself changing the tab spacing every time
  5. you get into Perfect Writer?  Do you run up against the message
  6. "Swap File Full" every now and then?  Have you looked longingly
  7. at the description of the PWCONFIG program in appendix A of the
  8. Perfect Writer manual, wishing that Kaypro had included it in the
  9. software package?  Then the following program may be just the
  10. thing for you.
  11.  
  12.     I found myself desperately in need of a larger swap file
  13. when I tried to edit a big file that I had transferred to my
  14. Kaypro from another computer.  There was just simply no way that
  15. a 95K file was going to fit in the 64K swap file that came with
  16. Perfect Writer.  So, necessity being the mother of invention, I
  17. wrote my own PWCONFIG.  After many hours of studying a hex dump
  18. of the swap file I was finally able to decipher most of the
  19. interesting parts.  All of the basic configuration information is
  20. contained in the first 1K of the swap file.  The remainder of the
  21. file is just there to reserve storage space on the disk.  This is
  22. why a "64K" swap file is actually 65K long.
  23.  
  24.     Of the first 1K, all but the first 128 bytes is a table that
  25. defines the keys that must be pressed for each command.  The
  26. PWBIND program that comes with Perfect Writer allows you to
  27. change this part of the file.  The missing PWCONFIG is used to
  28. change the values in the first 128 bytes.  Of these, the first
  29. 117 bytes simply tell Perfect Writer how to interface with the
  30. Kaypro hardware and operating system.  The next 8 bytes contain
  31. the good stuff.  These are the bytes that specify the "personal
  32. preference" parameters described in appendix A, including the
  33. size of the swap file.
  34.  
  35.     All that a homegrown version of PWCONFIG has to do is:
  36. @BEGIN(enumerate)
  37. Copy the first 117 bytes of an old swap file to a new one.
  38.  
  39. Let you type in your own choices for the next 8 bytes
  40.  
  41. Copy the remainder of the first 1K of the old swap file to the
  42. new one.
  43.  
  44. Pad the remainder of the new file to the appropriate length.
  45. @END(enumerate)
  46.  
  47.     The SBASIC program that follows is a very simple one that
  48. does just that.  In order to conserve newsletter space I have
  49. left out the code that checks the values entered by the user.  If
  50. you are reasonably careful, you can use the program as-is.  If
  51. you are a dealer who wants a novice-proof version to give to
  52. customers, you may want to add the data checks.  The swap file
  53. should be a multiple of 8K between 24 and 248 (inclusive).  On
  54. the Kaypro, the size of the disk actually limits the size of the
  55. swap file.  By the time you put PW.COM, PW.SWP, PW.HLP and a few
  56. other things on the disk, the swap file is limited to about 128K. 
  57. The absolute maximum (having just PW.COM and PW.SWP on the disk)
  58. is 152K.  The cursor display line must be between 1 and 24.  Tab
  59. spacing, fill column and indent column should all be between 0
  60. and 79.  Additionally, the indent column should be less than the
  61. fill column.  The delay count can be any valid integer, but the
  62. range between 100 and 1000 is a reasonable limit.  The clock rate
  63. is probably best left at 4, although the Kaypro actually runs at
  64. about 2.  If you feel particularly adventurous you can experiment
  65. with changing it.
  66.  
  67.     To run the program after it's compiled, put it and a copy of
  68. your old PW.SWP together on a disk in drive A.  Put a disk
  69. without a PW.SWP file (but enough empty space to hold the new
  70. file) in drive B.  Run the program and answer the questions.  It
  71. takes a while to build a large swap file but the program will
  72. indicate its progress by displaying the number of K it has
  73. written so far.
  74. @END(text)
  75.  
  76. @FLUSHLEFT(Chip Weems
  77. Computer and Information Science Dept.
  78. Graduate Research Center A-305
  79. University of Massachusetts
  80. Amherst, MA 01003)
  81. e cursor display line must be between 1 and 24.  Tab
  82. spacing, fill column and indent column