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 5BH (decimal 91) was introduced in DOS version 3.0. It is similar
  to function 3CH, which is (inaccurately) called the "create-file
  function." Function 3CH is actually designed to find a file or to create
  one if the requested file does not exist. By contrast, function 5BH is a
  pure create-file function and will fail if the file already exists.

  As with function 3CH, the CX register is set to the file attribute, and
  DS:DX contains the address of the pathname and filename (which is stored
  as an ASCIIZ string). On return, if CF = 0, then AX = file handle for the
  new file. If CF = 1, then AX contains the error code: 03H (path not
  found), 04H (no more handles), 05H (access denied), or 50H (file already
  exists).

  You should use function 3CH if you want to reuse a file with a particular
  filename if it exists or create a file with that name if it doesn't exist.
  If, however, you simply want to open a file that does not already exist,
  use function 5BH.

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