Page 2 of 2
Re:Getting interrupt's number within it's handler
Posted: Tue Feb 08, 2005 3:53 am
by Candy
B.E wrote:
I'm guessing the you would be able to get the interrupt's number from the PIC or the APIC.
For hardware interrupts, yes. Software interrupts and exceptions don't cooperate with that.
Re:Getting interrupt's number within it's handler
Posted: Tue Feb 08, 2005 10:49 am
by Pype.Clicker
Candy wrote:
B.E wrote:
I'm guessing the you would be able to get the interrupt's number from the PIC or the APIC.
For hardware interrupts, yes. Software interrupts and exceptions don't cooperate with that.
you have code/tutorials/datasheets/whatever for that ??
Re:Getting interrupt's number within it's handler
Posted: Tue Feb 08, 2005 11:58 am
by Candy
Pype.Clicker wrote:
you have code/tutorials/datasheets/whatever for that ??
Reference from "The Indispensable PC Hardware Book, V4", chapter 17 about the PIT, they describe how to read the ISR and IRR registers using OCW3. They're described as the "Interrupt Request Register" and the "In-Service Register". I figured using the ISR you could determine which one was in service.
Note that this still doesn't work for exceptions. There is also, as far as I know, no way to check for any given exception.