Open In App

Return from Subroutine and Return from Interrupt

In this article, we will discuss the Return from Subroutine and Return from Interrupt and will explain in detail and finally conclude with Difference between Return from Subroutine and Return from Interrupt. Let’s discuss it one by one.

Return from Subroutine :



Return from Interrupt :

Difference between Return from Subroutine and Return from Interrupt : 



  1. The IRET instruction is used to exit from an interrupt procedure while RET is to return from an subroutine.
  2. IRET is similar to RET except that RET will just pop two bytes to PC while IRET will reset the interrupt enable (IEN)  flip flop and two bytes will be popped from the stack. 
  3. In order to tell the processor that interrupt handling is over and flag can be reset, the IRET instruction is used instead of just RET.
  4. IRET functions identically to RET if it is executed outside of an ISR.
Article Tags :