Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- Peter Norton Programmer's Guide - Norton Guide http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]

  Function 59H (decimal 89) is used after an error occurs. It provides
  detailed information about the errors that occur under these
  circumstances: inside a critical-error (interrupt 24H) handler, after a
  DOS function call invoked with interrupt 21H reports an error by setting
  the carry flag (CF), and after old-style FCB file operations report a
  return code of FFH. It will not work with other DOS functions that do not
  report errors in CF, even though they may have ended in an error.

  This function is called in the standard way, by placing function code 59H
  in register AH. You must also specify a version code in the BX register.
  For DOS version 3, set the version code to 0.

  Four types of information are returned on completion of this service:

  .  AX contains the extended error code.

  .  BH indicates the class of error.

  .  BL gives the code of any suggested action that your program should
     take.

  .  CH gives a locus code, which attempts to show where the error occurred.

  Beware: Registers CL, DX, SI, DI, ES, and DS are also changed by function
  59H. Save these registers as necessary before you make a call to this
  function.

  The extended error codes can be organized into three groups: Codes 01H
  through 12H are returned by interrupt 21H functions. Codes 13H through 1FH
  are used in critical-error (interrupt 24H) handlers. The remaining error
  codes were introduced in DOS 3.0 and generally report network-related
  errors. Figure 17-17 lists the extended error codes, Figure 17-18 lists
  the error classes, Figure 17-19 lists the action codes, and Figure
  17-20 lists the locus codes.


   Error Code
  Hex     Dec    Description
  --------------------------------------------------------------------------
  Returned by interrupt 21H functions:
  00H      0     (No error)
  01H      1     Invalid function number
  02H      2     File not found
  03H      3     Path not found
  04H      4     No more handles (too many open files)
  05H      5     Access denied (e.g., attempt to write to read-only files)
  06H      6     Invalid handle
  07H      7     Memory control blocks destroyed
  08H      8     Not enough memory
  09H      9     Invalid memory-block address
  0AH     10     Invalid environment block
  0BH     11     Invalid format
  0CH     12     Invalid file-access code
  0DH     13     Invalid data
  0EH     14     (Reserved)
  0FH     15     Invalid drive specification
  10H     16     Attempt to remove the current directory
  11H     17     Not the same device
  12H     18     No more files

  Used in critical-error (interrupt 24H handlers:
  13H     19     Disk is write-protected
  14H     20     Unknown disk unit ID
  15H     21     Disk drive not ready
  16H     22     Unknown disk command
  17H     23     Disk data error
  18H     24     Bad disk request structure length
  19H     25     Disk seek error
  1AH     26     Non-DOS disk
  1BH     27     Disk sector not found
  1CH     28     Printer out of paper
  1DH     29     Write error
  1EH     30     Read error
  1FH     31     General failure

  Used in DOS versions 3.0 and later:
  20H     32     File-sharing violation
  21H     33     File-locking violation
  22H     34     Invalid disk change
  23H     35     No FCB available
  24H     36     Sharing buffer overflow
  25H-31H 37-49  (Reserved)
  32H     50     Network request not supported
  33H     51     Remote computer not listening
  34H     52     Duplicate name on network
  35H     53     Network name not found
  36H     54     Network busy
  37H     55     Network device no longer exists
  38H     56     Network BIOS command limit exceeded
  39H     57     Network adapter hardware error
  3AH     58     Incorrect response from network
  3BH     59     Unexpected network error
  3CH     60     Incompatible remote adapter
  3DH     61     Print queue full
  3EH     62     Not enough space for print file
  3FH     63     Print file was deleted
  40H     64     Network name was deleted
  41H     65     Access denied
  42H     66     Network device type incorrect
  43H     67     Network name not found
  44H     68     Network name limit exceeded
  45H     69     Net BIOS session limit exceeded
  46H     70     Sharing temporarily paused
  47H     71     Network request not accepted
  48H     72     Print or disk redirection is paused
  49H-4FH 73-79  (Reserved)
  50H     80     File already exists
  51H     81     (Reserved)
  52H     82     Cannot create directory entry
  53H     83     Fail on interrupt 24H
  54H     84     Out of network structures
  55H     85     Network device already assigned
  56H     86     Invalid password
  57H     87     Invalid parameter
  58H     88     Network data fault
  --------------------------------------------------------------------------


  Figure 17-17.  DOS extended error codes.

     Code
  Hex     Dec     Meaning
  --------------------------------------------------------------------------
  01H      1      Out of resource: no more of whatever you asked for
  02H      2      Temporary situation: Try again later
  03H      3      Authorization: You aren't allowed; someone else might be
  04H      4      Internal error in DOS: not your fault
  05H      5      Hardware failure
  06H      6      System software error: other DOS problems
  07H      7      Application software error: It's your fault
  08H      8      Item requested not found
  09H      9      Bad format (e.g., unrecognizable disk)
  0AH     10      Item locked
  0BH     11      Media error (e.g., disk reports CRC error)
  0CH     12      Already exists
  0DH     13      Error class is unknown
  --------------------------------------------------------------------------

  Figure 17-18.  The error classes returned in register BH by function 59H.

    Code
  Hex    Dec   Meaning
  --------------------------------------------------------------------------
  01H    1     Try again several times, then issue "Abort or Ignore" prompt.
  02H    2     Try again after a pause, then issue "Abort or Ignore" prompt.
  03H    3     Ask the user to change incorrect information (e.g., bad
               filename).
  04H    4     Shut down the program, but OK to clean up (e.g., close
               files).
  05H    5     Shut down immediately; don't try to clean up.
  06H    6     Ignore the error: It's for information only.
  07H    7     Retry after user action (e.g., change diskettes).
  --------------------------------------------------------------------------

  Figure 17-19.  The suggested action codes returned in register BL by
  function 59H.

         Code
  Hex         Dec          Meaning
  --------------------------------------------------------------------------
  01H         1            Unknown: sorry
  02H         2            Block device (e.g., disk drive)
  03H         3            Network
  04H         4            Serial device (e.g., printer)
  05H         5            Memory
  --------------------------------------------------------------------------

  Figure 17-20.  The locus codes returned in register CH by function 59H.

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson