The IRET instruction

Return from interrupt.

The IRET instruction format

InstructionDescription
IRETReturn from an interrupt or exception handling procedure.

The IRET (Interrupt Return) instruction is used to return from an interrupt handler. It pops three words from the stack: IP (or EIP), CS and FLAGS, which the processor had pushed there on entry to the interrupt. Control is then returned to the interrupted program, and the FLAGS register is restored to its original state.

Processor status flags

CF
Yes*
PF
Yes*
AF
Yes*
ZF
Yes*
SF
Yes*
TF
Yes*
IF
Yes*
DF
Yes*
OF
Yes*

*IRET restores all the flags from the stack.