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
Sends system control messages to all the virtual devices and, depending on the message, to the VMM. Uses Flags, and possibly other registers depending on the service.
If the Create_VM message is specified and the service is successful, the EBX register contains the new virtual machine handle.
If the Create_Thread message is specified and the service is successful, the EDI register contains the new thread handle.
Message
System control message to send. Can be one of the values listed in VMM Messages, or a private message in the reserved private system control range described above.
VM
Handle of a virtual machine. This parameter is not required by every system control message.
Param1
Message-specific parameter.
Param2
Message-specific parameter.
Param3
Message-specific parameter.
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. |
The system never uses message numbers in the range BEGIN_RESERVED_PRIVATE_SYSTEM_CONTROL through END_RESERVED_PRIVATE_SYSTEM_CONTROL, which remain free for use by virtual devices. Microsoft has not defined a protocol for virtual devices to reserve regions of the private system control message space and thus avoid accidentally colliding.
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.