home *** CD-ROM | disk | FTP | other *** search
/ CP/M / CPM_CDROM.iso / jsage / zsus / z3help / c.lbr / CHKDIR.HZP / CHKDIR.HLP
Encoding:
Text File  |  1991-11-18  |  5.0 KB  |  100 lines

  1. ;
  2.                                  CHKDIR.COM                                   
  3.  
  4.              Size (recs) CRC   Version    Author/Latest Issue      Disk
  5.                3k (20)   72EE  1.0        Gene Pizzetta 10/90      Z3COM3
  6.  
  7.   1- Syntax  2- Errors  3- Configuration  4- Speed  5- Assembly               
  8.  
  9.    CHKDIR checks a  disk  directory  for  duplicate  directory  entries,  user
  10. numbers greater than 31, extent numbers greater than 31, record counts greater
  11. than 128 (80h),  filenames  containing  illegal characters,  allocation groups
  12. assigned to multiple files,  and  allocation groups assigned twice to the same
  13. file.  In addition, it reports the names of null (zero-length) files.
  14.  
  15.    CHKDIR is based on  CLEANDIR 1.8 by  Steve Dirickson,  but it contains only
  16. the diagnostic code.   It does  no  writing,  so it  poses  no  danger  to the
  17. directory or to !!!TIME&.DAT files.
  18. :1
  19.  Syntax   CHKDIR dir:
  20.  
  21.    A DU or DIR specification is required,  but only the  drive is significant.
  22. If only a user specification is given, the current drive is assumed.  If no DU
  23. or DIR specification is given, a brief usage message will be displayed.
  24. :2
  25.  ERRORS   
  26.  
  27.    If any errors are found in the directory,  CHKDIR  will report them and set 
  28. the program error flag to the appropriate value:
  29.  
  30.        2  02h  invalid directory
  31.        4  04h  miscellaneous error
  32.       12  0Ch  insufficient memory to load entire directory
  33.      250  FAh  duplicate directory entry
  34.      251  FBh  user area greater than 31
  35.      252  FCh  illegal characters in filename
  36.      253  FDh  extent number greater than 31
  37.      254  FEh  record count greater than 128 (80h)
  38.      255  FFh  allocation block used more than once
  39.  
  40.    If multiple errors are encountered,  the  error  code on  exit will reflect
  41. only the most recent one.  Null files are reported, but do not cause errors.
  42.  
  43.    In addition,  CHKDIR will  invoke the error handler,  primarily so a ZEX or 
  44. SUB file can be aborted, if necessary.
  45. :3
  46.  CONFIGURATION - 1/2 
  47.  
  48.    CHKDIR can be  configured using  ZCNFG and the  CHKDIRnn.CFG  configuration
  49. file.  Do not change the name of the CFG file so ZCNFG can find it even if you
  50. change CHKDIR's name.
  51.  
  52.    The first option determines whether CHKDIR will do a warm boot on exit.  As
  53. distributed CHKDIR does not overwrite the command processor so it  can  make a
  54. simple return on exit.  If your disk directories are so large that CHKDIR runs
  55. out of memory, you can gain a little space by answering "YES" here, which will
  56. cause the CP to be overwritten and a warm boot on exit.
  57.  
  58.    The second option  determines  whether  CHKDIR will run  null files through
  59. its checking procedures.   While reading a directory CHKDIR always reports the
  60. names of null (zero-length) files,  but it  does not include such files in its
  61. directory checking routines  because programs such as  SAP erase such files by
  62. default.   If you want null files  included in the checking  routines,  answer
  63. "YES" here.
  64.  CONFIGURATION - 2/2 
  65.  
  66.    The third option,  designating a tag character,  has no  effect  unless the
  67. second option, above,  is  set  to "YES".   The  tag  character  is  the first
  68. character of disk labels,  such as those  used  by  cataloging programs.   The
  69. character is usually "-" (2Dh),  "#" (23h),  or "!" (21h).   If this option is
  70. configured, disk labels will not be  checked,  even  if  the  second option is
  71. "YES".   This is  important if you  use lower-case disk labels.   If you don't
  72. want disk labels skipped, make this option a null (00h).
  73. :4
  74.  SPEED   
  75.  
  76.    CHKDIR may seem slow  because it takes  time to  check  all  allocation map
  77. entries.   On  a 9.216 MHz SB180,  CHKDIR  takes 49 seconds to  do  allocation
  78. checking on  a directory with  1000  groups  allocated  (a little  less than 4
  79. Megabytes).   Since  the  procedure  is  completely  compute-bound,   you  can
  80. calculate how long it will take to check your disk  by scaling this figure for 
  81. your processor speed and the  number of  groups  allocated in  your directory.
  82. Remember,  the  maximum  number of  entries the disk can  have no longer means
  83. anything.  Only active directory entries are seen by CHKDIR.   As a worst-case
  84. example,  a 2 MHz Z80 checking the directory of a filled 8 Meg disk would take
  85. almost 7 minutes.
  86. :5
  87.  ASSEMBLY 
  88.  
  89.    This version was  developed and  assembled  with  SLR  System's  SLRMAC and
  90. SLRNK+.
  91.  
  92.    This version allocates a smaller-than-usual amount of space for the stack--
  93. 50 bytes.   This should be more than  sufficient for most  systems,  since the
  94. maximum that is on the stack at any  BIOS entry is 10 bytes -- on the  call to
  95. SECTRN;  all other BIOS calls have 8 or less bytes on the stack.   Unless your
  96. BIOS read or write routines take more than 40 bytes of stack space, you should
  97. have no problem.   If you do, just change the amount of space for the stack to
  98. a larger value and re-assemble the source code.   Note that this  will  reduce
  99. the amount of space available for directory entries.
  100.