# Returning from Interrupt Service Routine (ISR)

The Return from Interrupt (RETFIE) instruction is used to mark the end of an ISR.

When the RETFIE 1 instruction is executed, the PC is loaded with the saved PC value from the top of the PC stack. Saved context is also restored with the execution of this instruction. Thus, execution returns to the state of operation that existed before the interrupt occurred.

When the RETFIE 0 instruction is executed, the saved context is not restored back to the registers.