Begin_Nest_V86_Exec

include vmm.inc

VMMCall Begin_Nest_V86_Exec
 

Sets the current virtual machine to V86 mode and prepares the virtual machine for nested execution. This service is used in conjunction with the End_Nest_Exec service to create a nested execution block in which a virtual device may call the Exec_Int, Resume_Exec, and various simulation services. Virtual devices use these services to call software in the virtual machine. Uses Client_CS, Client_IP, and Flags

When in a nested execution block, a virtual device may call the Exec_Int and Resume_Exec services any number of times.

This service should only be used by virtual devices that convert protected-mode calls into V86 calls. For example, the virtual MS-DOS manager uses this service to map calls to MS-DOS functions (Interrupt 21h) issued by protected-mode programs into calls to MS-DOS functions in V86 mode.

This service should be used by virtual devices that need to be sure that they are calling V86-mode code. A typical usage is translating a protected-mode call into a V86-mode call. After the parameters are translated, Begin_Nest_V86_Exec is used to ensure that the subsequent simulation is into V86-mode.

If the current VM is the System VM, Begin_Nest_V86_Exec will also call VMMCall Begin_V86_Serialization, which uses the V86 mutex to serialize all System VM threads through the System VM's V86 mode of execution.

This service saves the current execution mode of the virtual machine, and End_Nest_Exec restores the mode.

See Also

Begin_Nest_Exec, End_Nest_Exec, Exec_Int, Resume_Exec