RTE (ReTurn from Exception)
RTE
<Description>
This instruction returns from an interrupt-handling routine. It pops the condition code register
(CCR) and program counter (PC) from the stack. Program execution continues from the
address restored to the program counter.
The CCR and PC contents at the time of execution of this instruction are lost.
The CCR is one byte in size, but it is popped from the stack as a word (in which the lower 8
bits are ignored).
This instruction therefore adds 4 to the value of the stack pointer (R7).
<Instruction Formats>
<Operation>
@SP+
→
CCR
@SP+
→
PC
<Assembly-Language Format>
RTE
<Examples>
RTE
<Operand Size>
—
<Condition Code>
I: Restored from stack.
H: Restored from stack.
N: Restored from stack.
Z: Restored from stack.
V: Restored from stack.
C: Restored from stack.
I
H
N
Z
V
C
↕
↕
↕
↕
↕
↕
↕
↕
RTE
5
6
7
0
10
Addressing
mode
Mnem.
Operands
1st byte
Instruction code
No. of
states
2nd byte
3rd byte
4th byte
102
Содержание H8/300 Series
Страница 2: ...H8 300 Programming Manual...