ISR
Jump to navigation
Jump to search
ISR stands for interrupt service routine.
Overview
An ISR is an interruption of normal program flow, usually triggered by a hardware event, such as a peripheral device having received a character or a Timer having expired. In this case, CPU intervention is required. As a result of the IRQ (Interrupt request) the CPU enters the Interrupt service routine which is written to handle things. An ISR is written in a way where it restores all registers so that regular program flow can continue upon completion of the ISR. So the first thing that happens is usually saving (pushing) registers onto the stack. The last thing is typically the opposite, restoring these registers and returning via some sort of RET / RETI instruction (BLX on ARM).