Outils pour utilisateurs

Outils du site


back2root:ibm-pc-ms-dos:interrupts:int_21:int_21_3d

INT 0x21 - 0x3d - Open File or Device Using Handle

Request/Call:

reg value descr
AH 0x3d
AL open mode (see below)
DS:DX pointer to ASCIIZ file name

open mode

Bit Descr
0-2 Access Mode (see below)
3 reserved, always 0
4-6 sharing mode (DOS 3.1+)
7 1 : private, 0: inheritable (DOS 3.1+)

Access Mode

bits Descr
000 Read
001 Write
010 Read & Write

sharing mode

bits descr.
000 compatibility mode (exclusive)
001 Deny others read/write access
010 deny others write access
011 deny others read access
100 full access permitted to all

Return:

CF is cleared : success

reg descr
AX File Handle

CF is set: error

reg descr
AX error code (see DOS Error Code)

Notes & Comments

  • will open normal, hidden and system files
  • file pointer is placed at beginning of file

Back

back2root/ibm-pc-ms-dos/interrupts/int_21/int_21_3d.txt · Dernière modification : 2024/01/14 20:37 de frater