include vmm.inc mov eax, Message ; system control message mov ebx, VM ; VM handle (if needed by message) mov esi, Param1 ; message-specific parameter mov edi, Param2 ; message-specific parameter mov edx, Param3 ; message-specific parameter VMMcall System_Control jc error ; carry flag set if error |
The System_Control service sends system control messages to all the virtual devices and, depending on the message, to the VMM.
Message
Specifies the system control message. This parameter can be one of the following values:
Value | Meaning |
Begin_PM_App | A protected-mode application is starting. |
Close_VM_Notify | A virtual machine is closing. |
Create_VM | A virtual machine is being created. |
Critical_Reboot_Notify | System is restarting (interrupt disabled). |
Debug_Query | Requests for virtual device's debugging interface. |
Destroy_VM | A virtual machine is being destroyed. |
Device_Init | Virtual devices initializing (interrupts enabled). |
Device_Reboot_Notify | System is restarting (interrupts enabled). |
End_PM_App | A protected-mode application is ending. |
Init_Complete | All virtual devices have initialized. |
Power_Event | Power is being suspended or resumed. |
Reboot_Processor | Virtual device must restart system if it can. |
Set_Device_Focus | A virtual device is taking the focus. |
Sys_Critical_Exit | System is terminating (interrupt disabled). |
Sys_Critical_Init | Virtual devices initializing (interrupts disabled). |
Sys_VM_Init | System VM is being created. |
Sys_VM_Terminate | System VM is being destroyed. |
System_Exit | System is terminating (interrupts enabled). |
VM_Critical_Init | Virtual machine being created (interrupts disabled). |
VM_Init | Virtual machine being created (interrupts enabled). |
VM_Not_Executeable | Virtual machine being destroyed. |
VM_Resume | Virtual machine execution resumed. |
VM_Suspend | Virtual machine execution suspended. |
VM_Terminate | Virtual machine begin destroyed. |
For more information about these messages, see Chapter 27, “VMM Message Reference.”
VM
Specifies a handle identifying a virtual machine. This parameter is not required by every system control message.
Param1
Specifies a message-specific parameter.
Param2
Specifies a message-specific parameter.
Param3
Specifies a message-specific parameter.
The carry flag is clear if the service is successful. Otherwise, the carry flag is set to indicate an error.
If the Create_VM message is successful, the EBX register contains the new virtual machine handle.
Although virtual devices may receive many of the system control messages, they may send only the following messages:
Message | Description |
Create_VM | May only be sent by the virtual shell device. |
Destroy_VM | May only be sent by the virtual shell device. |
Set_Device_Focus | May be sent by any virtual device. If the device ID is zero, all devices with a focus that can be set, must set their focus to the specified virtual machine. |
End_PM_App | May only be sent by the virtual MS-DOS manager. |
Virtual devices must send and reply to messages correctly to prevent erratic system behavior.
This service uses the ECX register, therefore the register cannot be used to pass data through to the virtual device receiving the control message.
EBX, Flags