DOS/32 Advanced DOS Extender - Technical Reference 2.0 - DOS/32 Advanced - Startup In general, the DOS Extender will take the following actions when started: detect if enough conventional (DOS) memory is present to run detect system software type: Clean (INT 15h), XMS, VCPI or DPMI initialize the present system, allocate extended memory and enter the protected mode After having successfully entered the protected mode, the loader will be executed and will attempt to load your 16/32-bit protected mode application. When the program is loaded into memory, it will be executed. At the very startup of the DOS Extender, DOS/32 Advanced will detect the type of the CPU and FPU installed into the machine on which the DOS Extender is currently running. DOS/32 Advanced will correctly detect and identify different CPU types manufactured by different CPU vendors. The FPU will be detected and initialized as well and will be reset to hold zeroes only. After that, DOS/32 Advanced will try to detect and initialize the underlying system software. When the system software is detected to be Clean, XMS or VCPI, the built-in DPMI host of DOS/32 Advanced will attempt to allocate the extended memory from the system. Note that the extended memory that is to be allocated by the DOS Extender, will be allocated once at startup, not in blocks when you call DPMI functions 05xxh. This may explain why under VCPI there will be a delay when the DOS Extender is started, since some VCPI servers (for example emm386.exe) will require additional time to test and map pages into pagetables. Under Clean and XMS systems, DOS/32 Advanced will also enable the A20 line, which will allow the DOS Extender to get an access to the extended memory. On exit, the state of the A20 line will be restored, ie if it was enabled, it will not be disabled by the DOS Extender. Note that under Clean system, the DOS Extender will always leave the A20 line enabled when exiting to DOS. The built-in DPMI host will, when installed, preserve the following interrupts in real mode: INT 1Bh (CTRL-BREAK) INT 1Ch (Timer ticks) INT 21h (DOS API) INT 23h (CTRL-C) INT 24h (Critical handler) INT 2Fh (Multiplex) These real mode interrupts will be restored on exit to DOS no matter how the DOS Extender was configured, since they are the keys to important system resources. That means that your protected mode program can not install these interrupts for later use by programs in real mode when the protected mode program is terminated and the DOS is running. Please also note that the real mode DOS itself will restore interrupts 23h and 24h when performing its cleanup after the program issued INT 21h AH=4Ch. Four callbacks will be allocated by the built-in DPMI to send the following real mode interrupts from real mode to protected mode: INT 1Bh (CTRL-BREAK) INT 1Ch (Timer ticks) INT 23h (CTRL-C) INT 24h (Critical handler) Please note that these real mode callbacks will not be installed unless you install the corresponding interrupts in protected mode. Three software interrupts will be installed in protected mode by the DOS Extender: INT 10h (Video BIOS API) INT 21h (DOS API) INT 33h (Mouse API) These interrupts in protected mode will extend the corresponding real mode interrupts, ie convert protected mode pointers to real mode values, perform buffered reads/writes and so on. The interrupt INT 21h will be trapped by the built-in DPMI in the both real and protected modes. In the real mode, DOS function AH=4Ch (Terminate Program) will be sent to a protected mode termination routine. This will ensure that if a real mode program tries to terminate your protected mode program (for example when you have not installed protected mode INT 1Bh, CTRL-BREAK, but you use that key combination anyway), the extended memory will be deallocated by the built-in DPMI and the protected mode program will be terminated in the proper way. The DOS Extender will also try to initialize a mouse driver, first using a software reset function AX=0021h, and if it fails/not supported by the mouse driver use a hardware reset function AX=0000h. If both calls return an error, the DOS Extender will assume that no mouse/mouse driver is present and will redirect the protected mode INT 33h to an IRETD instruction causing any calls to INT 33h in protected mode to return without performing any action. If a mouse/mouse driver was successfully detected, the DOS Extender will allocate a callback for the extended mouse function 000Ch which will be used to inform the protected mode handler of mouse events. After the DOS Extender and DPMI have been initialized, DOS/32 Advanced will load and execute your protected mode program. Copyright © Supernar Systems, Ltd. 1996-2002 All Rights Reserved.