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 5Ah
 Detail Example                          Up Contents Index Back
────────────────────────────────────────────────────────────────────────────
 
  Interrupt:   21h     Function:   5Ah
 
  Title:       Create Temporary File [Version 3.0+]
 
  See also:    Create File, @MakeFile
 
  Description:
 
     Creates a file with a unique name, in the current or specified
     directory on the default or specified disk drive, and returns a
     handle that can be used by the program for subsequent access to
     the file. The name generated for the file is also returned in a
     buffer specified by the program.
 
     Input                                     Output
 
     AH = 5Ah                                  If function successful
     CX = Attribute (bits can be combined)       Carry flag: clear
                                                 AX = Handle
          Bits     Significance (if set)         DS:DX = segment:offset of
                                                         complete ASCIIZ
          0        Read-only                             path name
          1        Hidden
          2        System                      If function unsuccessful
          3-4      Reserved (0)                  Carry flag: set
          5        Archive                       AX = Error code (03h,
          6-15     Reserved (0)                       04h, or 05h)
                                                 See: Error codes
     DS:DX = segment:offset of ASCIIZ path
             name
                                    -♦-