beautypg.com

Zilog Z8F0130 User Manual

Page 199

background image

eZ8

CPU Core

User Manual

UM012820-0810

LDX Instruction

184

If Working Register R1 contains the value

B3h

, and Register

702h

con-

tains the value

46h

, the following statement loads the value

46h

into Reg-

ister

B3h

:

LDX @R1, 702h

Object Code: 85 17 02

The contents of Working Register R1 and Register

702h

are not affected.

If Register Pair (

22h, 23h

) contains the value

0655h

, and Register

0655h

contains the value

1Ch

, the following statement loads the value

1Ch

into Register

96h

:

LDX 96h, @22h

Object Code: 86 22 96

The contents of Register Pair (

22h, 23h

) and Register

0655h

are not

affected.

If Register

20h

contains the value

28h

, and Register Pair (

F2h, F3h

)

contains the value

0167h

, and Register

0167h

contains the value

9Bh

,

the following statement loads the value

9Bh

into Register

28h

:

LDX @20h, @.ER(F2h)

Object Code: 87 F2 20

The contents of Register

20h

, Register Pair (

F2h, F3h

), and Register

0167h

are not affected.

The

.ER

notation is used in this case to resolve the ambiguity that

would otherwise be present as to which operand (

20h or F2h

) is to be

treated as a Register Pair.

If Working Register Pair

RR10

contains the value

0529h

, and Register

0530h

(

0529h + 07h = 0530h

) contains the value

C1h

, the following

statement loads the value

C1h

into Working Register R1:

LDX R1, 7(RR10)

Object Code: 88 1A 07

Note: