beautypg.com

Zilog Z8F0130 User Manual

Page 240

background image

eZ8

CPU Core

User Manual

UM012820-0810

SRA Instruction

225

Attributes

Escaped Mode Addressing

Using Escaped Mode Addressing, address modes R or IR can specify a
working register. If the destination address is prefixed by

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 R6 contains the value

31h

(

00110001b

), the follow-

ing statement leaves the value

18h

(

00011000b

) in Working Register R6,

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

SRA R6

Object Code: D0 E6

If Register

C6h

contains the value

DFh

, and Register

DFh

contains the

value

B8h

(

10111000b

), the following statement leaves the value

DCh

(

11011100b

) in Register

DFh

, resets the C, Z and V flags and sets the S

flag:

SRA @C6h

Object Code: D1 C6

Mnemonic Destination

Op
Code
(Hex)

Operand 1 Operand 2 Operand 3

SRA

R1

D0

R1

SRA

@R1

D1

R1