qa.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 3DH
   Summary  Notes  Example  Back
──────────────────────────────────────────────────────────────────────────────
 
  Description:  Open File
 
  Given an ASCIIZ pathname, opens the specified file in the designated or
  default directory on the designated or default disk drive. A handle is
  returned that can be used by the program for subsequent access to the
  file.
 
  Input                                         Output
  ══════════════════════════════                ══════════════════════════
  AH=3DH                                        If function successful
  AL=access mode                                Carry flag=clear
    Bit(s)   Significance                       AX=handle
    0-2      access mode                        If function unsuccessful
             000=read access                    Carry flag=set
             001=write access                   AX=error code
             010=read/write access
    3        reserved (0)
    4-6      sharing mode
              (MS-DOS versions
              3.0 and later)
             000=compatibility mode
             001=deny all
             010=deny write
             011=deny read
             100=deny none
    7        inheritance flag
              (MS-DOS versions
              3.0 and later)
  0=child process inherits handle
  1=child does not inherit handle
  DS:DX=segment:offset of ASCIIZ
         pathname
                                    -♦-