beautypg.com

Zilog Z8F0130 User Manual

Page 167

background image

eZ8

CPU Core

User Manual

UM012820-0810

INCW Instruction

152

Attributes

Escaped Mode Addressing

Using Escaped Mode Addressing, address modes RR can specify a work-
ing register Pair or IR can specify a working register. If the high nibble of
the source or destination address is

Eh

(

1110b

), a working register (or

Pair) is inferred. For example, if Working Register Pair R12 and R13
(with base address

Ch

) is the preferred destination operand, use

ECh

as the

destination operand in the Op Code. To access Register Pairs with
addresses

E0h

to

EFh

, either set the Working Group Pointer,

RP[7:4]

, to

Eh

or use indirect addressing.

Sample Usage

If Register Pair

30h

and

31h

contain the value

0AF2h

, the following

statement leaves the value

0AF3h

in Register Pair

30h

and

31h

and clears

the Z, V, and S flags:

INCW 30h

Object Code: A0 30

If Working Register R0 contains

30h

, and Register Pair

30h

and

31h

con-

tain the value

FAF3h

, the following statement leaves the value

FAF4h

in

Register Pair

30h

and

31h

, sets the S flag, and clears the Z and V flag.

INCW @R0

Object Code: A1 E0

Mnemonic Destination

Op
Code
(Hex)

Operand 1 Operand 2 Operand 3

INCW

RR1

A0

RR1

INCW

@R1

A1

R1