Virtual Devices (3.1) (vdag31qh.hlp) (Table of Contents; Topic list)
VPICD_Call_When_Hw_Int
                                                     Up Next Previous
────────────────────────────────────────────────────────────────────────────
 
include vpicd.inc
 
pushfd
cli                                 ; disable interrupts
mov     esi, OFFSET32 Callback      ; points to callback procedure
VxDcall VPICD_Call_When_Hw_Int
popfd
mov     [Next_Callback], esi        ; address of next callback in chain
 
The VPICD_Call_When_Hw_Int service 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.
 
Parameter  Description
────────────────────────────────────────────────────────────────────────────
 
Callback   Points to the callback procedure. When the system calls the
           procedure, the EBX register contains the handle of the current
           virtual machine.
 
Return Value
 
The ESI register contains the address of the next procedure in the callback
chain.
 
Comments
 
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.
 
Uses
 
ESI, Flags
 
                                      ♦