DevHelp SetIRQ

This service sets a hardware interrupt vector to the physical device driver interrupt handler.

C
 USHORT APIENTRY DevHelp_SetIRQ (NPFN  IRQHandler,                                USHORT IRQLevel,                                USHORT SharedFlag) 

Assembler
 MOV  AX,Offset CS:handler ; Interrupt handler offset MOV  BX,IRQnum            ; Interrupt level number (0 - Fh) MOV  DH,Shared_Int        ; Interrupt sharing (0 = not shared, 1 = shared) MOV  DL,DevHlp_SetIRQ

CALL [Device_Help] 

C

 * IRQHandler (NPFN) : input - Pointer to the Interrupt handler
 * IRQLevel (USHORT) : input - Interrupt level number (0-FH)
 * SharedFlag (USHORT) : input - Interrupt sharing (0=not shared, 1=shared)

Assembler
 MOV  AX,Offset CS:handler ; Interrupt handler offset MOV  BX,IRQnum            ; Interrupt level number (0 - Fh) MOV  DH,Shared_Int        ; Interrupt sharing (0 = not shared, 1 = shared) 

C
Success Indicator: 0

Possible errors: IRQ is not available.
 * If the IRQ is already owned by another device driver as not-shared
 * If the IRQ is the IRQ used to cascade the slave 8259 interrupt controller (IRQ 2).

Assembler
 'C' Clear if successful.

'C' Set if error. AX = Error code.

Possible errors: IRQ is not available if carry flag is set. 

Remarks
The physical device driver should use the DevHlp_RegisterStackUsage for each DevHlp_IRQ call. See Limiting the Number of Nested Interrupts.

The attempt to register an interrupt handler for an IRQ to be shared will fail under any of the following circumstances: The attempt to register an interrupt handler for an IRQ to be not-shared will fail under any of the following circumstances: DS should be set to the physical device driver's data segment. If the physical device driver has issued a call to PhysToVirt referencing the DS register, it should restore DS to its original value.
 * If the IRQ is already owned by another device driver as not-shared
 * If the IRQ is the IRQ used to cascade the slave 8259 interrupt controller (IRQ 2).
 * If the IRQ is already owned by another device driver as shared or not-shared
 * If the IRQ is the IRQ used to cascade the slave 8259 interrupt controller.

The IRQnum value is range checked and C (the carry flag) is set if IRQnum is not in the range of 0-0Fh.

Hardware interrupt sharing is not supported on all systems. A SetIRQ request to share an interrupt level on a system where sharing is not supported returns an error. See Hardware Interrupt Management for a discussion of the limitations on hardware interrupt sharing and the systems supported.

C

 * 1) include "dhcalls.h"

USHORT APIENTRY DevHelp_SetIRQ (NPFN  IRQHandler,                                USHORT IRQLevel,                                USHORT SharedFlag) 