| 
 |  | 
                   INT 21 - DOS 4.0 - EXTENDED OPEN/CREATE                    
  
    
      | 
         Input  | 
      DOS1 | 
      N | 
      DOS3 | 
      N | 
      
         DOS4  | 
      Y | 
      DOS5 | 
      Y | 
      
         Output  | 
     
    
      | 
         AX  | 
      6Ch | 
      00h | 
      File
        Handle / Error Code | 
      AX | 
     
    
      | 
         BX  | 
       Open
        Mode | 
        | 
        | 
      BX | 
     
    
      | 
         CX  | 
       File
        Attributes | 
      Action
        Taken | 
      CX | 
     
    
      | 
         DX  | 
       Action
        Flag | 
        | 
        | 
      DX | 
     
    
      | 
         DS:SI  | 
       ASCIIZ
        File Name | 
      Set
        if Error | 
      CF | 
     
   
 
  
  
  
    
      | Open
        Mode | 
     
    
      | Bit | 
      Dec | 
      Hex | 
       Description | 
     
    
      | 0 | 
      1 | 
      0001h | 
       Access: 000
        = Read Only 
                    
        001 = Write Only 
                    
        010 = Read / Write | 
     
    
      | 1 | 
      2 | 
      0002h | 
     
    
      | 2 | 
      4 | 
      0004h | 
     
    
      | 3 | 
      8 | 
      0008h | 
       Reserved | 
     
    
      | 4 | 
      16 | 
      0010h | 
       Compatibility:
        000 = Compatibility 
                              
        001 = Deny All 
                              
        010 = Deny Write 
                              
        011 = Deny Read 
                              
        100 = Deny None | 
     
    
      | 5 | 
      32 | 
      0020h | 
     
    
      | 6 | 
      64 | 
      0040h | 
     
    
      | 7 | 
      128 | 
      0080h | 
       Not passed to Child | 
     
    
      | 8 | 
      256 | 
      0100h | 
       Reserved | 
     
    
      | 9 | 
      512 | 
      0200h | 
     
    
      | 10 | 
      1024 | 
      0400h | 
     
    
      | 11 | 
      2048 | 
      0800h | 
     
    
      | 12 | 
      4096 | 
      1000h | 
     
    
      | 13 | 
      8192 | 
      2000h | 
       Return error i.s.o. INT
        24h | 
     
    
      | 14 | 
      16384 | 
      4000h | 
       Auto commit on Write | 
     
    
      | 15 | 
      32768 | 
      8000h | 
       Reserved | 
     
   
  
 
  
  
  
    
      | Action
        Flag | 
     
    
      | Bit | 
      Dec | 
      Hex | 
       Description | 
     
    
      | 0 | 
      1 | 
      0001h | 
       Exists: 0000
        = Fail 
                    0001
        = Open 
                    0010
        = Replace | 
     
    
      | 1 | 
      2 | 
      0002h | 
     
    
      | 2 | 
      4 | 
      0004h | 
     
    
      | 3 | 
      8 | 
      0008h | 
     
    
      | 4 | 
      16 | 
      0010h | 
       Not
        Exists: 0000 = Fail 
                         
        0001 = Create | 
     
    
      | 5 | 
      32 | 
      0020h | 
     
    
      | 6 | 
      64 | 
      0040h | 
     
    
      | 7 | 
      128 | 
      0080h | 
     
    
      | 8 | 
      256 | 
      0100h | 
       Reserved | 
     
    
      | 9 | 
      512 | 
      0200h | 
     
    
      | 10 | 
      1024 | 
      0400h | 
     
    
      | 11 | 
      2048 | 
      0800h | 
     
    
      | 12 | 
      4096 | 
      1000h | 
     
    
      | 13 | 
      8192 | 
      2000h | 
     
    
      | 14 | 
      16384 | 
      4000h | 
     
    
      | 15 | 
      32768 | 
      8000h | 
     
   
  
 
Action Taken:
        01h = File existed and was opened
        02h = File did not exist, created
        03h = File existed, was replaced
See Also File Attributes Error Codes |