Zilog Z08470 User Manual

Page 183

Advertising
background image

UM008007-0715

Z80 Instruction Description

Z80 CPU

User Manual

171

DAA

Operation

@

Op Code

DAA

Operands

None.

Description

This instruction conditionally adjusts the Accumulator for BCD addition and subtraction
operations. For addition (ADD, ADC, INC) or subtraction (SUB, SBC, DEC, NEG), the
following table indicates the operation being performed:

Operation

C Before

DAA

Hex Value

In Upper

Digit

(Bits 7–4)

H Before

DAA

Hex Value

In Lower

Digit

(Bits 3–0)

Number

Added To

Byte

C After

DAA

0

9–0

0

0–9

00

0

0

0–8

0

A–F

06

0

0

0–9

1

0–3

06

0

ADD

0

A–F

0

0–9

60

1

ADC

0

9–F

0

A–F

66

1

INC

0

A–F

1

0–3

66

1

1

0–2

0

0–9

60

1

1

0–2

0

A–F

66

1

1

0–3

1

0–3

66

1

SUB

0

0–9

0

0–9

00

0

SBC

0

0–8

1

6–F

FA

0

DEC

1

7–F

0

0–9

A0

1

NEG

1

6–7

1

6–F

9A

1

0

0

0

1

1

1

1

0

27

Advertising
This manual is related to the following products: