include vmm.inc mov cx, Segment ; code segment of routine to call mov edx, Offset ; offset of routine to call VMMcall Build_Int_Stack_Frame
Prepares the current virtual machine to execute an interrupt routine. This service saves the current Client_CS, Client_IP, and Client_Flags registers on the virtual machine's stack and sets the Client_CS and Client_IP registers to the address of the interrupt routine specified by the Segment and Offset parameters. When execution resumes in the virtual machine (such as when the Resume_Exec service is called), the virtual machine executes the interrupt routine. The interrupt routine continues to run until it executes an iret instruction. Uses Client_CS, Client_EIP, Client_ESP, Client_Flags, Flags.
Segment
Segment address or segment selector for the code segment containing the interrupt routine.
Offset
Offset of interrupt routine. If the specified code segment is a 16-bit segment, the high word of this parameter must be 0.
The following example executes the interrupt routine in the code segment specified by My_Segment at the offset My_Offset:
VMMcall Begin_Nest_Exec mov cx, [My_Segment] mov edx, [My_Offset] VMMcall Build_Int_Stack_Frame VMMcall Resume_Exec VMMcall End_Nest_Exec
See also Simulate_Far_Call