include vpicd.inc
pushfd
cli
mov esi, OFFSET32 Callback
VxDcall VPICD_Call_When_Hw_Int
popfd
mov [Next_Callback], esi
Installs a callback procedure for hardware interrupts. The system calls the callback procedure whenever a hardware interrupt occurs. The caller must disable interrupts before calling this service. Uses ESI and Flags.
Although any virtual device can use this service, the service is intended for use by the virtual DMA device to detect completion of DMA transfers. On systems with hardware devices that interrupt frequently, use of this service should be avoided. Installing a callback procedure to process every hardware interrupt can have a major impact on performance.
The callback procedure is responsible for chaining to the next handler in the interrupt chain. It also must preserve the EBX register for the next handler.