Assembly Language Help (alang.hlp) (Table of Contents; Topic list)
Important Notice
The pages on this site contain documentation for very old MS-DOS software, purely for historical purposes. If you're looking for up-to-date documentation, particularly for programming, you should not rely on the information found here, as it will be woefully out of date.
Int 21h Function 3Ch
 Detail Example                          Up Contents Index Back
────────────────────────────────────────────────────────────────────────────
 
  Interrupt:   21h     Function:   3Ch
 
  Title:       Create File
 
  See also:    Create New File, Create Temporary File
 
  Description:
 
     Given an ASCIIZ path name, creates a new file in the designated or
     default directory on the designated or default disk drive. If the
     specified file already exists, it is truncated to zero length. In
     either case, the file is opened and a handle is returned that can
     be used by the program for subsequent access to the file.
 
     Input                                          Output
 
     AH = 3Ch                                       If function
     CX = File attribute (bits can be combined)     successful
                                                       Carry flag: clear
          Bits     Significance (if set)               AX = Handle
 
          0        Read-only                        If function
          1        Hidden                           unsuccessful
          2        System                              Carry flag: set
          3        Volume label                        AX = Error code (03h,
          4        Reserved (0)                             04h, or 05h)
          5        Archive                             See: Error codes
          6-15     Reserved (0)
 
     DS:DX = segment:offset of ASCIIZ path name
                                    -♦-