ZiLOG eZ80 User Manual page 306

Hide thumbs Also See for eZ80:
Table of Contents

Advertisement

RETI
Return from Maskable Interrupt
Operation
PC ← (SP)
Description
The RETI instruction returns program control back to the point in the user's application
code where an interrupt caused the program control to jump to the current maskable inter-
rupt service routine. The return address pops from the stack and is written to the Program
Counter. Before the device executes the RETI instruction, the enable interrupt instruction
(EI) should execute to allow recognition of interrupts after completion of the current inter-
rupt service routine. The MADL control bit must be set to 1 to enable mixed-ADL mode
interrupts. If the MADL is reset to 0, the suffixed instructions do not operate correctly.
More detailed operation is provided in
Table 86. RET Instruction Detail
ADL
0
1
0
1
UM007714-0908
Suffix Operation
None
The starting Program Counter is {MBASE, PC[15:0]}.
Pop a 2-byte return address from {MBASE, SPS} into
PC[15:0]. The ADL mode bit remains cleared to 0. The
ending Program Counter is {MBASE, PC[15:0]}.
None
The starting Program Counter is PC[23:0]. Pop a 3-byte
return address from SPL into PC[23:0]. The ADL mode
bit remains set to 1. The ending Program Counter is
PC[23:0].
.S
An invalid suffix. RETI.L must be used in all mixed-
memory mode applications.
.S
An invalid suffix. RETI.L must be used in all mixed-
memory mode applications.
Table
86.
®
eZ80
CPU
User Manual
297
CPU Instruction Set

Hide quick links:

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the eZ80 and is the answer not in the manual?

Questions and answers

Subscribe to Our Youtube Channel

Table of Contents