Software interrupts

Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
Legend

Re:Software interrupts

Post 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 ...
Brandon

Re:Software interrupts

Post 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?
bkilgore

Re:Software interrupts

Post 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.
Brandon

Re:Software interrupts

Post by Brandon »

thank you, didnt know that iret also restored the flag value.
Post Reply