To avoid this potential problem when the user configures your program to use IRQ7, simply check the corresponding ISR bit in your service routine. If it is set, the request is normal. If it is not set, the request was a false one. Below is an example in assembly how to read the interrupt controller and check the ISR bit for IRQ7.
mov al,0Bh ; select PIC In Service Register
out 20h,al ;
in al,20h ; read In Service Register
test al,10000000b ; test for true IRQ7
jz EOI_Exit ; if zero, false interrupt, exit IR
©1996
Creative Labs, Inc.