beautypg.com

Call – Zilog Z8F0130 User Manual

Page 127

background image

eZ8

CPU Core

User Manual

UM012820-0810

CALL Instruction

112

CALL

Definition

CALL procedure.

Syntax

CALL dst

Operation

SP

 SP – 2

@SP

 PC

PC

 dst

Description

The Stack Pointer decrements by two, the current contents of the Program
Counter, which is the address of the first instruction following the CALL
instruction, are pushed onto the top of the stack and the specified destina-
tion address is then loaded into the Program Counter. The Program Coun-
ter now points to the first instruction of the procedure.

At the end of the procedure, a RET instruction returns to the original pro-
gram flow. RET pops the top of the stack and replaces the original value
into the Program Counter.

Flags

C

Unaffected

Z

Unaffected

S

Unaffected

V

Unaffected

D

Unaffected

H

Unaffected