What are interrupts?
Submitted By: Craig Steiner FAQ Last Modified: 07/10/06
- Interrupts, as the name implies, are processes that interrupt normal program execution. Normally, a program will start executing at address 0000h and execute consecutively, unless program flow is altered by some branching or jump instruction. Interrupts are used to interrupt normal program flow to handle some special task, then return to continue executing the program as if nothing had happened.
For example, you may have an interrupt programmed to interrupt every milisecond. Most of the time your program will execute normally. Once every milisecond, however, an "interrupt" will occur that will cause your main program to be temporarily "suspended." Execution will jump automatically to an "interrupt service routine" which you write to handle the interrupt condition. Once you've done everything you need to during the interrupt, you return from the interrupt with a RETI instruction. Your program then continues as if nothing had ever happened and unaware that it has been interrupted.
See the Interrupts tutorial for more information on interrupts.
Add Information to this FAQ: If you have additional information or alternative solutions to this question, you may add to this FAQ by clicking here.