ZiLOG eZ80 User Manual page 335

Hide thumbs Also See for eZ80:
Table of Contents

Advertisement

RST n
Restart
Operation
(SP) ← PC
PC ← {0000h,n}
Description
The RST instruction functions similar to a CALL instruction. However, the 8-bit n oper-
and is limited to 8 specific values:
stacking the Program Counter (and ADL mode bit, if necessary), the RST instruction is
written the 8-bit restart vector n to the Program Counter.
Table 92. RST N Instruction Detail
ADL
0
1
0
1
UM007714-0908
Suffix Operation
None
The starting Program Counter is {MBASE, PC[15:0]}.
Push the 2-byte return address, PC[15:0], onto the
{MBASE,SPS} stack. The ADL mode bit remains
cleared to 0. Write {00h, nn} to PC[15:0]. The ending
Program Counter is {MBASE, PC[15:0]} = {MBASE, 00h,
nn}.
None
The starting Program Counter is PC[23:0]. Push the 3-
byte return address, PC[23:0], onto the SPL stack. The
ADL mode bit remains set to 1. Write {0000h, nn} to
PC[23:0]. The ending Program Counter is
PC[23:0] = {0000h, nn}.
.S
The starting Program Counter is {MBASE, PC[15:0]}
Push the 2-byte return address, PC[15:0], onto the
{MBASE, SPS} stack. Push a 02h byte onto the SPL
stack, indicating an interrupt from Z80 mode (ADL = 0).
The ADL mode bit remains cleared to 0. Write {00h, nn}
to PC[15:0]. The ending Program Counter is {MBASE,
PC[15:0]} = {MBASE, 00h, nn}.
.S
The starting Program Counter is PC[23:0]. Push the 2
LS bytes of the return address, PC[15:0], onto the
{MBASE, SPS} stack. Push the MS byte of the return
address, PC[23:16], onto the SPL stack. Push a 03h
byte onto the SPL stack, indicating an interrupt from
ADL mode, because ADL = 1. Reset ADL mode bit to 0.
Write {00h, nn} to PC[15:0]. The ending Program
Counter is {MBASE, PC[15:0]} = {MBASE, 00h, nn}.
,
,
,
,
00h
08h
10h
18h
20h
®
eZ80
User Manual
,
,
, and
. After
28h
30h
38h
CPU Instruction Set
CPU
326

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?

Table of Contents