Reti; Reti.d - Epson S1C17 Series Manual

Cmos 16-bit single chip microcontroller
Hide thumbs Also See for S1C17 Series:
Table of Contents

Advertisement

7 DETAILS OF INSTRUCTIONS

reti

reti.d

Function
Return from interrupt handler routine
Standard)
Extension 1) Unusable
Extension 2) Unusable
15 14 13 12 11 10
Code
0
0
0
|
|
0
0
0
|
|
IL
IE
C
Flag
↔ ↔ ↔ ↔ ↔ ↔
|
|
Mode
CLK
reti
reti.d
Description
(1) Standard
reti
Restores the contents of the PC and PSR that were saved to the stack when an interrupt occurred
to the respective registers, and return from the interrupt handler routine. The SP is incremented
by an amount equivalent to four bytes.
(2) Delayed branch (d bit (bit 7) = 1)
reti.d
For the reti.d instruction, the next instruction becomes a delayed slot instruction. A delayed
slot instruction is executed before the program returns from the interrupt handler routine.
Interrupts are masked in intervals between the reti.d instruction and the next instruction, so
no interrupts occur.
Example
reti
7-116
{psr, pc} ← A[sp], sp ← sp + 4
9
8
7
6
|
0
0
0
0
1
0
0
|
|
|
|
|
|
|
0
0
0
0
1
1
0
|
|
|
|
|
|
V
Z
N
|
|
|
Three cycles
Two cycles (when a one-cycle delayed slot instruction follows), Three cycles (other)
; Return from a interrupt handler routine
Seiko Epson Corporation
5
4
3
2
1
0
|
1
0
1
0
0
0
|
|
|
|
|
|
1
0
1
0
0
0
|
|
|
|
|
reti
reti.d
S1C17 CORE MANUAL
(REV. 1.2)

Advertisement

Table of Contents
loading

Table of Contents