- 7.2.27. -
Table of Contents
7. PMODE/W MSDOS Extender
7.2. PMODE/W Supported DPMI INT 31h functions
7.2.27. Function 0306 - Get Raw Mode Switch Addresses
7.2.27. Function 0306 - Get Raw Mode Switch
Addresses
PMODE/W API
This function Returns addresses that can be called for low level mode switching.
In:
AX = 0306h
Out:
always successful:
carry flag clear
BX:CX = segment:offset of real to protected mode
switch procedure
SI:EDI = selector:offset of protected to real mode
switch procedure
Notes:
The real mode segment:offset returned by this function should be called only
in real mode to switch to protected mode. The protected mode selector:offset
returned by this function should be called only in protected mode to switch
to real mode.
The mode switch procedures are entered by a FAR JMP to the appropriate address
with the following parameters:
AX = new DS
CX = new ES
DX = new SS
(E)BX = new (E)SP
SI = new CS
(E)DI = new (E)IP
The processor is placed into the desired mode, and the DS, ES, SS, (E)SP, CS,
and (E)IP registers are updated with the specific values. In other words,
execution of the client continues in the requested mode at the address provided
in registers SI:(E)DI. The values specified to be placed into the segment
registers must be appropriate for the destination mode. That is, segment
addresses for real mode, and selectors for protected mode.
The values in EAX, EBX, ECX, EDX, ESI, and EDI after the mode switch are
undefined. EBP will be preserved across the mode switch call so it can be used
as a pointer. FS and GS will contain zero after the mode switch.
If interrupts are disabled when the mode switch procedure is invoked, they
will not be re-enabled by the host (even temporarily). It is up to the client
to save and restore the state of the task when using this function to switch
modes. This requires the state save/restore procedures whose addresses can be
obtained with INT 31h function 0305h.
- 7.2.27. -