beautypg.com

Zilog Z8F0130 User Manual

Page 153

background image

eZ8

CPU Core

User Manual

UM012820-0810

DECW Instruction

138

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

0AF1h

in Register Pair

30h

and

31h

and clears

the Z, V, and S flags:

DECW 30h

Object Code: 80 30

If Working Register R0 contains

30h

and Register Pair

30h

and

31h

con-

tain the value

FAF3h

, the following statement leaves the value

FAF2h

in

Register Pair

30h

and

31h

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

DECW @R0

Object Code: 81 E0

Mnemonic Destination

Op
Code
(Hex)

Operand 1 Operand 2 Operand 3

DECW

RR1

80

RR1

DECW

@R1

81

R1