DOS/32 Advanced DOS Extender extends most of DOS functions that are used in WATCOM C/C++ libraries. Since real mode DOS does not use 32-bit pointers and has no knowledge of protected mode selectors and descriptors, the DOS Extender has to convert protected mode values to real mode values and vice-versa. Furthermore the real mode DOS is capable of accessing data under 1MB limit only, so the DOS Extender has to transfer required data from protected mode to a real mode buffer (DOS Transfer Buffer) where it can be reached by the 16-bit DOS.
The following is a list of all DOS functions that have been extended and made available to your program when calling them from protected mode. Most of them require a pointer that is to be converted to real mode values and passed down to real mode DOS. The extended DOS functions are available through software interrupt 21h (INT 21h). The function number is placed in register AH. If the function was successful, carry flag on return will be cleared, otherwise the carry flag will be set, and an error code will be placed in the EAX register.
DOS/32 Advanced will strictly follow the following rules when returning data in registers in protected mode:
- if the real mode DOS function returns value in a 16-bit register, the high word of that 32-bit register will be set to zero.
- if the real mode DOS function returns value in an 8-bit register, the rest of that 32-bit register will be unmodified.
- if the real mode DOS function returns a pointer, the high word of the 32-bit register that contains the selector value will be unmodified, and the offset will be returned as a 32-bit value in a 32-bit register.
In addition to the standard DOS functions, DOS/32 Advanced will provide some special functions that among other things will return the information about DOS Extender's configuration and introduce a 32-bit versions of DPMI functions that will make it easier to allocate extended memory and selectors. To call these functions you need to place the 0FFh value in register AH and a function number in register AL. Remember that these functions are supported by DOS/32 Advanced DOS Extender only, and are not available neither in other DOS Extenders, nor in real mode DOS.
Please note that most of real mode DOS functions that do not require pointer translation or real mode segment values placed in segment registers will work in protected mode as well.
All Rights Reserved.