beautypg.com

Zilog Z8F0130 User Manual

Page 143

background image

eZ8

CPU Core

User Manual

UM012820-0810

CPCX Instruction

128

Attributes

Escaped Mode Addressing

Using Escaped Mode Addressing, address mode ER for the source or des-
tination can specify a working register with 4-bit addressing.

If the high byte of the source or destination address is

EEh

(

11101110b

),

a working register is inferred. For example, the operand

EE3h

selects

Working Register R3. The full 12-bit address is provided by

{RP[3:0],

RP[7:4], 3h}

.

To access registers on Page

Eh

(addresses

E00h

to

EFFh

), set the Page

Pointer, RP[3:0], to

Eh

and set the Working Group Pointer,

RP[7:4]

, to

the preferred Working Group.

Sample Usage

If Register

AB3h

contains the value

16h

, Register

911h

contains the

value

20h

and the Carry flag is 1, the following statement sets the C and S

flags, and clears the Z and V flags:

CPCX %AB3, %911

Object Code: 1F A8 91 1A B3

If Register

26Ch

contains the value

2Ah

, the Carry flag is 0, and the Zero

flag is 0, the following statement sets the Z flag, and clears the C, S, and
V flags:

CPCX 26Ch, #2Ah

Object Code: 1F A9 2A 02 6C

Mnemonic

Destination,
Source

Op
Code
(Hex)

Operand 1 Operand 2 Operand 3

CPCX

ER1, ER2

1F A8

ER2[11:4]

{ER2[3:0],
ER1[11:8]}

ER1[7:0]

CPCX

ER1, IM

1F A9

IM

{0h,
ER1[11:8]}

ER1[7:0]