Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- DOS 5.0 Ref. - <b>function 5bh create new file dos 3.0+</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
Function 5Bh            Create New File                              DOS 3.0+

    Creates the specified file, if the file does not already exist.

        Entry   AH    = 5Bh
                CX    = File attributes
                DS:DX = Pointer to ASCIIZ filename

        Return  AX = File handle
                or
                AX = Error code, if CF is set
                     | 03h Path not found
                     | 04h No handle available
                     | 05h Access denied
                     | 50h File exists

    ------------------------------------------------------------------

    The filename parameter must be a valid DOS filename and cannot
    contain wildcards.
    The file attributes parameter can be a combination of:
    attr_normal, attr_readonly, attr_hidden, attr_system, attr_archive.


    This function will create a file and assign it the first available
    file handle. If the specified already exists, this function fails.

    When DOS creates a file, it opens it with read-and-write access
    and compatibility sharing mode and sets the file pointer to zero.
    If the attr_readonly attribute is specified, it takes affect only
    after the new file is closed.

See Also: 3ch 5ah 6ch 59h File attributes

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