beautypg.com

Zilog Z80380 User Manual

Page 37

background image

5-3

Z380

U

SER

'

S

M

ANUAL

Z

ILOG

DC-8297-03

5.2.7 Condition Codes

The Carry, Zero, Sign, and Parity/Overflow flags are used
to control the operation of the conditional instructions. The
operation of these instructions is a function of the state of
one of the flags. Special mnemonics called condition
codes are used to specify the flag setting to be tested
during execution of a conditional instruction; the condition
codes are encoded into a 3-bit field in the instruction
opcode itself.

Table 5-1 lists the condition code mnemonic, the flag
setting it represents, and the binary encoding for each
condition code.

Table 5-1. Condition codes

Condition Codes for Jump, Call, and Return Instructions
Mnemonic

Meaning

Flag Setting

Binary Code

NZ

Not Zero*

Z = 0

000

Z

Zero*

Z = 1

001

NC

No Carry*

C = 0

010

C

Carry*

C = 1

011

NV

No Overflow

V = 0

100

PO

Parity Odd

V = 0

100

V

Overflow

V = 1

101

PE

Parity Even

V = 1

101

NS

No Sign

S = 0

110

P

Plus

S = 0

110

S

Sign

S = 1

111

M

Minus

S = 1

111

*Abbreviated set

Condition Codes for Jump Relative and Call Relative Instructions
Mnemonic

Meaning

Flag Setting

Binary Code

NZ

Not Zero

Z = 0

100

Z

Zero

Z = 1

101

NC

No Carry

C = 0

110

C

Carry

C = 1

111