Quote:
Originally posted by djcapelis
So interrupts effectively facilitate good function jumps then?
|
I'm not sure exactly what you mean by a "function jump", but the way I understand it, when the system encounters an interrupt, it executes a predefined function, and then goes straight back to where it left off.
At the machine level, the system pushes the program counter (the address of the instruction it was at before it received the interrupt) into a stack, stores any important information, and jumps to the code of the function that should be run on the given interrupt. Once the interrupt's code has completed, the original address is popped out of the stack, and all of the aforementioned important information is put back in its original place.
I hope I got that all right. If not, please correct me.