beautypg.com

Zilog Z16F2810 User Manual

Page 119

background image

UM018809-0611

EXT Instruction

ZNEO

®

CPU Core

User Manual

103

EXT

Definition

Extend

Syntax

EXT dst, src

Operation

dst

src

Description

This instruction loads an 8-bit or 16-bit value from the source register into the destination register
with Signed or Unsigned extension. Byte (8-bit) or Word (16-bit) data size is selected by adding
a .B or .W, suffix, respectively, to the EXT mnemonic. A “U” in the mnemonic suffix selects zero
(unsigned) extension. An “S” in the mnemonic suffix selects signed extension. See LD for
instructions to read memory values with extension.

Flags

Syntax and Opcodes

7

6

5

4

3

2

1

0

C

Z

S

V

B

CIRQE IRQE

*

*

*

Legend

C

= No change.

Z

= Set to 1 if the result is zero; otherwise, set to 0.

S

= Set to 1 if the result msb is 1; otherwise set to 0.

V

= No change.

B

= Cleared to 0.

CIRQE

= No change.

IRQE

= No change.

Instruction, Operands

Word 0

Word 1

Word 2

EXT.SW Rd, Rs

{43H, Rs, Rd}

EXT.UW Rd, Rs

{41H, Rs, Rd}

EXT.SB Rd, Rs

{42H, Rs, Rd}

EXT.UB Rd, Rs

{40H, Rs, Rd}

This manual is related to the following products: