include vmm.inc mov edx, PortID mov ecx, IOType mov eax, OutputData VMMCall _Simulate_VM_IO mov [InputData], eax
Reduces complex I/O instructions to simpler I/O operations. Uses EAX, flags.
PortID
Identifies the port for which input or output is simulated.
IOType
Specifies the type of I/O. It can be one of the following values:
Value | Meaning |
Byte_Input | Inputs a single byte. |
Byte_Output | Outputs a single byte. |
Dword_Input | Inputs a doubleword. |
Dword_Output | Outputs a doubleword. |
Word_Input | Inputs a word. |
Word_Output | Outputs a word. |
OutputData
The data to be output. (This parameter is only used if the service is called to simulate output.)
This service is called to simulate port I/O from the current VM. It is useful for VxDs which need to alter the state of other VxDs. For example, a VxD could perform a simulated EOI by calling this procedure with:
mov al, 20h mov edx, 20h mov ecx, Byte_Output VMMcall Simulate_VM_IO
Which is the same as a VM executing:
mov al, 20h out 20h, al