Page 2 of 2

Re:Software interrupts

Posted: Fri Aug 06, 2004 5:59 am
by Legend
After an IRQ? Well, an interrupt gate disables interrupts upon entering, and reenables them again when ireting when they have been enabled before entering the IRQ ...

Re:Software interrupts

Posted: Fri Aug 06, 2004 6:52 am
by Brandon
So an iret re-enables interrupts? Allways or just in this case? if only in this case, how does the computer know that it should enable interrupts?

Re:Software interrupts

Posted: Fri Aug 06, 2004 8:19 am
by bkilgore
When an interrupt handler is called, the value of EFLAGS, CS, and EIP are saved onto the stack, and then the IF flag is disabled, and finally the interrupt routine begins executing. When you iret, the values are popped back off the stack, including the saved value of the IF in the EFLAGS. The best source of information on this is really chapter 5 in the IA-32 Manuals volume 3, which you can find at: ftp://download.intel.com/design/Pentium4/manuals/25366814.pdf

Take a look at 5.12.1 for more information on what I was just talking about.

Re:Software interrupts

Posted: Fri Aug 06, 2004 9:42 am
by Brandon
thank you, didnt know that iret also restored the flag value.