EAX: Contains the value to be written to port (OUT operations only).
EBX: Contains the VM handle for which the I/O is being done.
ECX: Contains the I/O type flags (see VMM.INC for details).
EDX: Contains the port number for which I/O is being done.
EBP: Points to the VM's Client Registers.
EAX contains the result of an IN operation. NC indicates that the Main VDD should handle the I/O. All registers should be preserved in this case. CY indicates that the mini-VDD handled the I/O. In this case, only preserve EBX.
A mini-VDD can hook this routine if it needs to examine or virtualize I/O to ports which were previously registered with the Main VDD via the VDD_Register_Virtual_Port service. Normally, the Main VDD uses ports registered with this service simply to notify it of when to restore the Windows VM state when running a VGA application in a window. Then, I/O to these ports is always done physically (the I/O request is always done to the hardware). However, in some cases (see S3.VXD for an example), the mini-VDD needs to perform special handling or virtualization of these BLTer ports. By hooking this service, the mini-VDD will have the chance to virtualize the I/O to all ports previously registered by VDD_Register_Virtual_Port. If the mini-VDD has no interest in the port, it simply returns NC. If the mini-VDD handles the port and completes the I/O virtualization, it returns CY causing the Main VDD not to do its normal physical I/O to the port.