include vmm.inc
mov eax, Data ; data for output operations
mov ebx, VM ; current VM handle
mov ecx, IOType ; type of I/O operation
mov edx, Port ; I/O port number
mov ebp, OFFSET32 crs ; address of Client_Reg_Struc
VMMJmp Simulate_IO
mov [Data], eax ; data for input operation
Reduces complex I/O instructions to simpler I/O operations. An I/O callback procedure typically jumps to this service whenever the procedure receives a type of I/O that it does not directly support. Uses EAX, EBX, ECX, EDI, EDX, ESI, Flags.
Value | Meaning |
---|---|
Addr_32_IO | Uses 32-bit address offsets for input or output string operations. If this value is not given, the 16-bit offsets are used. |
Byte_Input | Inputs a single byte; place in AL if String_IO is not given. |
Byte_Output | Outputs a single byte from AL if String_IO is not given. |
Dword_Input | Inputs a doubleword; place in EAX if String_IO is not given. |
Dword_Output | Outputs a doubleword from EAX if String_IO is not given. |
Rep_IO | Repeats the input or output string operation the number of times specified by the Client_CX field in the Client_Reg_Struc structure. (The number of repetitions is stored in the Client_ECX field if Addr_32_IO is also set.) |
Reverse_IO | Decrements string address on each input or output operation. If this value is not given, the string address is incremented on each operation. |
String_IO | Inputs or outputs a string. The high 16-bits specifies the segment address of the buffer containing the string to output, or to receive the string input. |
Word_Input | Inputs a word; place in AX if String_IO is not given. |
Word_Output | Outputs a word from AX if String_IO is not given. |
The parameters to this service are identical to the parameters passed to an I/O callback procedure. A callback procedure should jump to this service, using the VMMJmp macro, with all of the registers in the same state as when the procedure was called. The procedure may modify the ESI and EDI register before jumping, if necessary.
Dispatch_Byte_IO, Emulate_Non_Byte_IO