home *** CD-ROM | disk | FTP | other *** search
/ Between Heaven & Hell 2 / BetweenHeavenHell.cdr / 300 / 294 / errmon.doc < prev    next >
Text File  |  1985-07-14  |  7KB  |  179 lines

  1.  
  2.  
  3.  
  4.  
  5.  
  6.  
  7.                                     ERRMON
  8.  
  9.                               By Robert J. Newton
  10.  
  11.        After experiencing a variety of problems with the hard disk on
  12.        my AT, I decided that I wanted a more informative report of disk
  13.        I/O errors than that provided by DOS.  ERRMON is the result.
  14.  
  15.        ERRMON is a resident program which inserts itself in the INT 13
  16.        chain.  It then sits quietly watching for any error condition
  17.        returned by the disk driver.  When an error is detected, it
  18.        springs to life and prints an error message on the screen.  This
  19.        message is in most cases far more informative than that provided
  20.        by DOS.  It then gracefully returns to the caller to let it do
  21.        what it wishes with the error.
  22.  
  23.        Under the proper conditions ERRMON will let you know when DOS is
  24.        making retries.  However, ERRMON does not scroll the screen. 
  25.        This means that it is possible that a second message will overlay
  26.        the first and you would not be aware of the retry unless the
  27.        calling program causes a scroll.
  28.  
  29.        A word of caution.  ERRMON has been written to respond to the
  30.        error codes returned by the IBM BIOS disk drivers on the PC, XT
  31.        and AT as shown in the various BIOS listings.  Results with
  32.        other drivers are totally unknown although it might be assumed
  33.        that they map their error codes the same in order to achieve
  34.        compatibility.  There are no checks for machine or drive type.
  35.  
  36.        In addition, the errors defined for the PC/XT and AT fixed disk
  37.        drivers are not the same in all cases.  ERRMON responds to the
  38.        codes for both.  It is possible, but not likely, that say the AT
  39.        could through some glitch return an error code that is not
  40.        defined on the AT, but is on the XT.  Instead of displaying an
  41.        "Undefined error" message, ERRMON would display the message
  42.        defined for the XT.  This possibility was considered so remote
  43.        that it was not trapped.
  44.  
  45.        The only error that ERRMON does not respond to is applicable
  46.        only to the AT.  Its floppy disk driver reports an error when a
  47.        disk is changed.  This is not a true i/o error and is ignored by
  48.        ERRMON.
  49.  
  50.        ERRMON's overhead is essentially nil, only four instructions
  51.        when there is no error.  Approximately 1K of memory will be used,
  52.        mostly for the message text.
  53.  
  54.        The video attribute for the error messages has been set to 0F,
  55.        intense white.  The messages will print in the lower right
  56.        corner of the screen.  You may change both of these by using
  57.        DEBUG.  The attribute byte is at offset 02EE and the screen line
  58.        is at offset 02E2.  Note that the screen line is relative to 0
  59.  
  60.                                        1
  61.  
  62.  
  63.  
  64.  
  65.  
  66.        so that the last line is hex 18, decimal 24.  For those with
  67.        MASM, you may change the EQUATEs at the beginning.  You may also
  68.        change the message text, perhaps to shorten it so that less
  69.        memory will be needed.
  70.  
  71.        Installation is simple, just type errmon.  A successful
  72.        installation will return ERRORLEVEL 0, unsuccessful will return
  73.        255.  It can be installed by an AUTOEXEC.BAT, preferably after
  74.        anything else which might place itself in the INT 13 chain.  You
  75.        can use >nul to avoid the sign on message.
  76.  
  77.  
  78.  
  79.                                 Error messages
  80.  
  81.        Sense failure (PC/XT only)
  82.  
  83.        Status error (AT only) - The controller status register returned
  84.        an error condition, but the error register did not contain an
  85.        error code.
  86.  
  87.        Write fault (AT only) - Indicates a hardware problem with the
  88.        drive. 
  89.  
  90.        Undefined error - An error code was returned for which BIOS has
  91.        not defined an error.
  92.  
  93.        Drive not ready (AT only)
  94.  
  95.        No response - What DOS calls Drive not ready.
  96.  
  97.        Seek failure - An attempt to seek to the requested track was
  98.        unsuccessful.
  99.  
  100.        Controller failure - Probably indicates that the controller could
  101.        not successfully complete the requested command within the
  102.        alloted time.
  103.  
  104.        EEC corrected data error - An information report that the
  105.        controller's EEC algorithm successfully corrected a soft data
  106.        error.  You should copy the file and delete the original if this
  107.        happens frequently.
  108.  
  109.        Bad CRC/EEC on read - The sector could not be successfully read. 
  110.        Retries should be made and if successful the file should be
  111.        rewritten or copied which will usually cure the situation. 
  112.        Otherwise, use RECOVER.
  113.  
  114.        Bad track (PC/XT only) - An operation was attempted on a track
  115.        flagged bad by the low level formatter.  Such areas should have
  116.        been marked bad in the FAT.
  117.  
  118.  
  119.                                        2
  120.  
  121.  
  122.  
  123.  
  124.  
  125.        Bad sector (AT only) - Similar to Bad track.
  126.  
  127.        Data crosses DMA boundary - This indicates a software problem;
  128.        DMA cannot operate with more than 64K of data.
  129.  
  130.        DMA overrun - The controller could not get DMA access; a retry
  131.        should succeed.
  132.  
  133.        Drive init failure - Probably indicates an attempt to initialize
  134.        an invalid drive number.
  135.  
  136.        Drive reset failure - An attempt to reset the drive system
  137.        failed.
  138.  
  139.        Sector not found - Bad news.  The requested sector could not be
  140.        found.  Assuming the values were valid, this indicates a flawed
  141.        disk.  Absent a very capable disk zapper and the knowledge of its
  142.        use, the only cure is a low level format.  It is also possible
  143.        that a disk made in one drive cannot be read in another because
  144.        one of them is out of alignment.
  145.  
  146.        Diskette write protected - Take the tab off.  If there is no tab
  147.        the drive's sensors are probably bad.
  148.  
  149.        Address mark not found - Very bad news.  See sector not found.
  150.  
  151.        Bad controller command - An invalid command was sent to the
  152.        controller.
  153.  
  154.  
  155.        ERRMON is (C) Copyright 1985 by Robert J. Newton, but hereby
  156.        released to the public domain for private non-commercial use.  It
  157.        may be freely copied and distributed, but no consideration may be
  158.        requested other than any customary handling fees charged by
  159.        recognized user's groups.  No warranties of any kind are provided
  160.        and by using the program the user assumes all risk.
  161.  
  162.  
  163.  
  164.  
  165.  
  166.  
  167.  
  168.  
  169.  
  170.  
  171.  
  172.  
  173.  
  174.  
  175.  
  176.  
  177.  
  178.                                        3
  179.