RTE

Return from the exception

RTE

ReTurn from Exception


[Syntax]

RTE

 

[Operation]

PC = *SP;

SP = SP + 4;

tmp = *SP;

SP = SP + 4;

PSW = tmp;

 

[Function]

-

This instruction returns execution from the exception handling routine by restoring the PC and PSW contents that were preserved when the exception was accepted.

-

This instruction is a privileged instruction. Attempting to execute this instruction in user mode generates a privileged instruction exception.

-

If returning is accompanied by a transition to user mode, the U bit in the PSW becomes 1.

 

[Instruction Format]

Syntax

Code size

(Byte)

RTE

2

[Flag Change]

Flag

C

V

S

O

Change

*

*

*

*

Note

* The flags become the corresponding values on the stack.

[Description Example]

RTE