Rst p – Zilog Z08470 User Manual

Page 301

Advertising
background image

UM008007-0715

Z80 Instruction Description

Z80 CPU

User Manual

289

RST p

Operation

(SP – 1) ← PCH, (SP – 2) ← PCL, PCH ← 0, PCL ← P

Op Code

RST

Operand

p

Description

The current Program Counter (PC) contents are pushed onto the external memory stack,
and the Page 0 memory location assigned by operand p is loaded to the PC. Program exe-
cution then begins with the op code in the address now pointed to by PC. The push is per-
formed by first decrementing the contents of the Stack Pointer (SP), loading the high-order
byte of PC to the memory address now pointed to by SP, decrementing SP again, and load-
ing the low-order byte of PC to the address now pointed to by SP. The Restart instruction
allows for a jump to one of eight addresses indicated in the following table. The operand p
is assembled to the object code using the corresponding T state.

Because all addresses are stored in Page 0 of memory, the high-order byte of PC is loaded
with

00h

. The number selected from the p column of the table is loaded to the low-order

byte of PC.

p

t

00h

000

08h

001

10h

010

18h

011

20h

100

28h

101

30h

110

38h

111

1

1

t

1

1

1

Advertising
This manual is related to the following products: