home *** CD-ROM | disk | FTP | other *** search
/ ftp.barnyard.co.uk / 2015.02.ftp.barnyard.co.uk.tar / ftp.barnyard.co.uk / cpm / walnut-creek-CDROM / BEEHIVE / UTILITYS / FIRE12.ARC / SAPP20.DOC < prev    next >
Text File  |  1991-08-11  |  7KB  |  147 lines

  1.  
  2.              SAPP v 2.0 Documentation
  3.                 08/02/87
  4.  
  5.         Sort & Pack Directory for CP/M 2.2 and 3.0
  6.                By George F. Reding
  7.  
  8.                Based upon SAP v 44
  9.               With subroutines from
  10.             CPM22E and SYSLIB
  11.  
  12. ------------------------------------------------------------------------
  13.                   NOTES
  14.  
  15. A bug was found in v 1.9 when used under CP/M 2.2 where the DMA pointer
  16. was not being advanced, so the buffer under 2.2 was being overwritten,
  17. thus trashing the directory.  The bug has been corrected by having moved
  18. 1 label and added another label, eg, DIRLOP & DIRLP1.  Thanks to David
  19. Bowerman, the Sysop of Frog Hollow RCPM System (604-937-0906) for having
  20. located the cause of the problem.  David then tested it on a disk with
  21. 250 of 256 directory entries used, under CP/M 2.2 and all is now fine.
  22.  
  23. SAPP v1.8 clobbered the DE registers in the XBIOS2 routine for 2.2 which
  24. caused the SECTRAN function to not work under CP/M 2.2.
  25.  
  26. My previous versions of this program for CP/M 3.0 only are also docu-
  27. mented in the source code of the program.  This new version has improve-
  28. ments which I shall attempt to briefly describe.
  29.  
  30. The program uses Z80 code wherever I could possibly make use of it,
  31. therefore, it can only be used on those systems which have a Z80 CPU.
  32. A simple test of Bob Freed's is used at the beginning of the program.
  33.  
  34. Then the CP/M version number is obtained from the system and is stored
  35. in the program.  This program uses BIOS functions for disk input/output
  36. and for such operations the version number is checked and appropriate
  37. routines are subsequently selected.
  38.  
  39. Data areas are initially zero-filled, with an additional buffer area
  40. being set up if CP/M 3.0.  If CP/M 3.0, the DPB offset and DPB lengths
  41. are set accordingly.
  42.  
  43. The desired disk is selected and the translation table address and DPB
  44. is copied to the program.  The program then tests the DRM value of the
  45. DPH, tests to see if there is enough TPA room to copy all of the direc-
  46. tory entries into the TPA.  If not enough room then a calculation is
  47. made to determine the maximum number of entries that the TPA can hold,
  48. which is then stored in the program's copy of the DPB for its usage and
  49. a warning is then given to the user.  (The warning may optionally be
  50. turned-off if the user providing that the user can remember to never ex-
  51. ceed the maximum number of entries that the program can handle.  If the
  52. warning flag is set for no message, then the program will continue on
  53. its own.)
  54.  
  55. This auto-faking of the DRM may occur when either the TPA is too low or
  56. the DRM is too large or both.  It will work for CP/M 2.2 or 3.0 systems.
  57.  
  58. ------------------------------------------------------------------------
  59.               CONFIGURATION
  60.  
  61. Very few items are required to be set by the user in either source code
  62. or in the COM file in order to use this program.  In the .COM file these
  63. user configurable bytes "should" be at the following locations (they
  64. follow the signon message that ends with my initials GFR and a 01A hex
  65. in case the .COM file was typed):
  66.  
  67.     011B    Clear screen code (6 bytes maximum)
  68.     0121    Null terminator for above
  69.     0122    CP/M 3.0 largest sector size (low/high)
  70.     0124    Normally E5 hex
  71.     0125    Normally 00 hex
  72.  
  73. The byte at 011B is the clear screen code for your console.  If you do
  74. NOT desire to clear your screen on program start, then set this first
  75. byte to 00 hex.  Six bytes maximum may be used for your clear screen
  76. code.  The byte at 0121 is a zero terminator for the clear screen.  If
  77. using less than 6 bytes to clear your screen, then set any unused bytes
  78. to zero.
  79.  
  80. At 0122 hex, is a word value for CP/M 3.0 systems.  Set this to your
  81. largest sector size used on your system.  The first byte of that word
  82. value is the low and the second byte is the high of the word, eg, for
  83. 1024 byte sectors the byte at 0122 is 00 hex and at 0123 is 04 hex.
  84. CP/M 2.2 users should just ignore this.
  85.  
  86. The byte at 0124 hex should be E5 hex.    The Morrow hard disk users (with
  87. the MD5, MD11, etc) should set it to 00 hex.  It is the value for the RC
  88. field of the directory entries.  On a Morrow hard disk computer, Morrow
  89. would set the  RC field of each potential directory entry to 00 with the
  90. other bytes to the normal E5, when the hard drive is formatted.  Whether
  91. it is checked by any of the Morrow utilities/programs or not is yet to
  92. be determined by me, so in order to prevent possible conflict with any
  93. possible Morrow program or utility, I have retained the oddity.  Leave
  94. the byte at 0124 set to E5 hex if you are NOT using a Morrow hard disk
  95. computer.
  96.  
  97. The byte at 0125 hex is the warning message flag.  It should be 00 hex
  98. to enable the program to give its warning message when the TPA is low
  99. and/or the DRM is too large.  Keep this byte set to zero unless your
  100. human memory is good and/or you are an experienced computer user.  If
  101. it's set to a NON-zero the program will not give a message, and will
  102. continue as if everything was alright.
  103.  
  104. ------------------------------------------------------------------------
  105.                   USAGE
  106.  
  107. It's not required to have this program on the drive on which its work is
  108. to be performed.   Some examples are as follows, where this program is
  109. on drive A.
  110.  
  111.     A>SAPP        do drive A
  112.     A>SAPP B:    do drive B
  113.     A>SAPP C:    do drive C
  114.     B>SAPP        do drive B (system uses search-path)
  115.     B>A:SAPP B:    do drive B (no system search-path)
  116.     B>SAPP C:    do drive C (system uses search-path)
  117.     B>A:SAPP C:    do drive C (no system search-path)
  118.  
  119. ------------------------------------------------------------------------
  120.              WARNING MESSAGE OPTION
  121.  
  122. If you encounter a warning message it is either because your TPA is too
  123. low and/or your system has the capability to have to have too many di-
  124. rectory entries  (than what the available memory can hold).  If you are
  125. unsure of the number of entries that are occupied then you should not
  126. continue at this time.
  127.  
  128. You then have to eliminate some files from disk with PIP and by erasing
  129. them and/or by using "DU" to "manually" perform a bit of what this pro-
  130. gram does.  Once you are sure that your number of directory entries does
  131. not exceed the maximum shown in the program's warning message, you may
  132. continue.  Be forewarned that to continue with the program when MORE en-
  133. tries exist than what the program states it can handle could very well
  134. destroy your directory!  (If in doubt, don't!)
  135.  
  136. ------------------------------------------------------------------------
  137.                  RELEASE
  138.  
  139. I have tested the program on a Morrow MD11 (now with two 20 Mb hard disk
  140. drives) under CP/M 3.0. It has also been tested on a CP/M 2.2 system.
  141.  
  142. This is a free "public domain" program, and as with most all programs,
  143. no warranties or guarantees are expressed or implied, although much ef-
  144. fort is made to ensure bug-free operation of the program.  Any user of
  145. the program uses  it at their own risk.
  146.                     - George F. Reding
  147.