Z80 instruction set, Z80 assembly language, Z80 status indicator flags – Zilog Z08470 User Manual

Page 75: Table 20, Flag register bit positions

Advertising
background image

UM008007-0715

Z80 Instruction Set

Z80 CPU

User Manual

63

Z80 Instruction Set

This chapter provides a description of the assembly language instructions available with
the Z80 CPU.

Z80 Assembly Language

Assembly language allows the user to write a program without concern for memory
addresses or machine instruction formats. It uses symbolic addresses to identify memory
locations and mnemonic codes (op codes and operands) to represent the instructions.
Labels (symbols) are assigned to a particular instruction step in a source program to iden-
tify that step as an entry point for use in subsequent instructions. Operands following each
instruction represent storage locations, registers, or constant values. The assembly lan-
guage also includes assembler directives that supplement the machine instruction. A
pseudo-op, for example, is a statement that is not translated to a machine instruction, but
rather is interpreted as a directive that controls the assembly process.

A program written in assembly language is called a source program, which consists of
symbolic commands called statements. Each statement is written on a single line and can
consist of one to four entries: A label field, an operation field, an operand field, and a com-
ment field. The source program is processed by the assembler to obtain a machine lan-
guage program (object program) that can be executed directly by the Z80 CPU.

Zilog provides several assemblers that differ in the features offered. Both absolute and
relocatable assemblers are available with the Development and Micro-computer Systems.
The absolute assembler is contained in base level software operating in a 16K memory
space, while the relocating assembler is part of the RIO environment operating in a 32K
memory space.

Z80 Status Indicator Flags

The Flag registers, F and F', supply information to the user about the status of the Z80
CPU at any particular time. The bit positions for each flag are listed in Table 20 and
defined in

Table 20. Flag Register Bit Positions

Bit

7

6

5

4

3

2

1

0

Position

S

Z

X

H

X

P/V

N

C

Advertising
This manual is related to the following products: