IRET
6-116
IRET Interrupt Return
SYNTAX OPTIONS OPCODE OBJMODE RPT CYC
IRET 0111 0110 0000 0010 X − 8
Operands None
Description Return from an interrupt. The IRET instruction restores the PC value and
other register values that were automatically saved by an interrupt
operation. The order in which the values are restored is opposite to the order
in which they were saved. All values are popped from the stack using 32-bit
operations. The stack pointer is not forced to align to an even address during
the register restore operations:
SP = SP – 2;
PC = [SP];
SP = SP – 2;
DBGSTAT:IER = [SP];
SP = SP − 2;
DP:ST1 = [SP];
SP = SP – 2;
AR1:AR0 = [SP];
SP = SP – 2;
PH:PL = [SP];
SP = SP – 2;
AH:AL = [SP];
SP = SP – 2;
T:ST0 = [SP];
SP = SP – 1;
Note: Interrupts cannot be serviced until the IRET instruction completes execution.
Flags and
SXM
The operation restores the state of all flags and modes of the ST0 register.
Modes
OVM
TC
C
Z
N
V
PM
OVC
INTM
The operation restores the state of the specified flags and modes of the ST1
register. The following bits are not affected: LOOP, IDLESTAT, M0M1MAP