beautypg.com

Rst n, Operation, Description – Zilog EZ80F916 User Manual

Page 335

background image

eZ80

®

CPU

User Manual

UM007715-0415

CPU Instruction Set

326

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:

00h

,

08h

,

10h

,

18h

,

20h

,

28h

,

30h

, and

38h

. After

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

Suffix Operation

0

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}.

1

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}.

0

.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}.

1

.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}.

This manual is related to the following products: