beautypg.com

Zilog Z8F0130 User Manual

Page 102

background image

eZ8

CPU Core

User Manual

UM012820-0810

AND Instruction

87

Attributes

Escaped Mode Addressing

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

Eh

(

1110b

), a working register is inferred. For example, if Working Register

R12 (

Ch

) is the preferred destination operand, use

ECh

as the destination

operand in the Op Code. To access registers with addresses

E0h

to

EFh

,

either set the Working Group Pointer,

RP[7:4]

, to

Eh

or use indirect

addressing.

Sample Usage

If Working Register R1 contains the value

38h

(

00111000b

) and Work-

ing Register R14 contains the value

8Dh

(

10001101b

), the following

statement leaves the value

08h

(

00001000b

)

in Working Register R1 and

clears the Z, V, and S flags:

AND R1, R14

Object Code: 52 1E

If Working Register R4 contains the value

F9h

(

11111001b

), Working

Register R13 contains the value

7Bh

, and Register

7Bh

contains the value

6Ah

(

01101010b

), the following statement leaves the value

68h

(

01101000b

) in Working Register R4 and clears the Z, V, and S flags:

Mnemonic

Destination,
Source

Op
Code
(Hex)

Operand 1 Operand 2 Operand 3

AND

r1, r2

52

{r1, r2}

AND

r1, @r2

53

{r1, r2}

AND

R1, R2

54

R2

R1

AND

R1, @R2

55

R2

R1

AND

R1, IM

56

R1

IM

AND

@R1, IM

57

R1

IM