beautypg.com

Zilog Z8F0130 User Manual

Page 97

background image

eZ8

CPU Core

User Manual

UM012820-0810

ADD Instruction

82

If Register

34h

contains the value

2Eh

and Register

12h

contains the

value

1bh

, the following statement leaves the value

49h

in Register

34h

,

sets the H flag, and clears the C, Z, S, V, and D flags:

ADD 34h, 12h

Object Code: 04 12 34

Using Escaped Mode Addressing, if Register

4Bh

contains the value

82h

,

Working Register R3 contains the value

10h

, and Register

10h

contains

the value

01h

, the following statement leaves the value

83h

in Register

4Bh

, sets the S flag, and clears the C, Z, V, D, and H flags:

ADD 4Bh, @R3

Object Code: 05 E3 4B

If Register

6Ch

contains the value

2Ah

, the following statement leaves the

value

2Dh

in Register

6h

. The C, Z, S, V, D, and H flags clear.

ADD 6Ch, #03h

Object Code: 06 6C 03

If Register

D4h

contains the value

5Fh

and Register

5Fh

contains the

value

4Ch

, the following statement leaves the value

4Eh

in Register

5Fh

and clears the C, Z, S, V, D, and H flags:

ADD @D4h, #02h

Object Code: 07 D4 02