beautypg.com

Stack pointer (sp), Program counter (pc), Flag register (f) – Zilog Z80180 User Manual

Page 193

background image

Z8018x

Family MPU User Manual

178

UM005003-0703

Stack Pointer (SP)

The Stack Pointer (SP) contains the memory address based LIFO stack.
SP is cleared to

0000H

during reset.

Program Counter (PC)

The Program Counter (PC) contains the address of the instruction to be
executed and is automatically updated after each instruction fetch. PC is
cleared to

0000H

during reset.

Flag Register (F)

The Flag Register stores the logical state reflecting the results of instruction
execution. The contents of the Flag Register are used to control program
flow and instruction operation.

Flag Register

Bit

7

6

5

4

3

2

1

0

Bit/Field

S

Z

Not Used

H

Not Used

P/V

N

C

R/W

R/W

R/W

?

R/W

?

R/W

R/W

R/W

Reset

0

0

?

0

?

0

0

0

R = Read W = Write X = Indeterminate ? = Not Applicable

Bit
Position Bit/Field R/W

Value

Description

7

S

R/W

0

Sign

.

S stores the state of the most significant bit

(bit 7) of the result. This is useful for operations with

signed numbers in which values with bit 7 = 1 are

interpreted as negative.

This manual is related to the following products: