beautypg.com

Adcw add with carry (word) – Zilog Z80380 User Manual

Page 56

background image

5-22

Z380

U

SER

'

S

M

ANUAL

DC-8297-03

Z

ILOG

ADCW
ADD WITH CARRY (WORD)

ADCW [HL,]src

src = R, RX, IM, X

Operation:

HL(15-0)

HL(15-0) + src(15-0) + C

The source operand together with the Carry flag is added to the HL register and the sum is
stored in the HL register. The contents of the source are unaffected. Two’s complement
addition is performed.

Flags:

S:

Set if the result is negative; cleared otherwise

Z:

Set if the result is zero; cleared otherwise

H:

Set if there is a carry from bit 11 of the result; cleared otherwise

V:

Set if arithmetic overflow occurs, that is, if both operands are of the same sign and the
result is of the opposite sign; cleared otherwise

N:

Cleared

C:

Set if there is a carry from the most significant bit of the result; cleared otherwise

Addressing

Execute

Mode

Syntax

Instruction Format

Time

Note

R:

ADCW [HL,]R

11101101 100011rr

2

RX:

ADCW [HL,]RX

11y11101 10001111

2

IM:

ADCW [HL,]nn

11101101 10001110 -n(low)- n(high)-

2

X:

ADCW [HL,](XY+d)

11y11101 11001110 ——d—

4+r

I

Field Encodings:

rr: 00 for BC, 01 for DE, 11 for HL
y:

0 for IX, 1 for IY