For hardware interrupts, yes. Software interrupts and exceptions don't cooperate with that.B.E wrote: I'm guessing the you would be able to get the interrupt's number from the PIC or the APIC.
Getting interrupt's number within it's handler
Re:Getting interrupt's number within it's handler
- Pype.Clicker
- Member
- Posts: 5964
- Joined: Wed Oct 18, 2006 2:31 am
- Location: In a galaxy, far, far away
- Contact:
Re:Getting interrupt's number within it's handler
you have code/tutorials/datasheets/whatever for that ??Candy wrote:For hardware interrupts, yes. Software interrupts and exceptions don't cooperate with that.B.E wrote: I'm guessing the you would be able to get the interrupt's number from the PIC or the APIC.
Re:Getting interrupt's number within it's handler
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.Pype.Clicker wrote: you have code/tutorials/datasheets/whatever for that ??
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.