beautypg.com

Zilog Z16F2810 User Manual

Page 138

background image

LEA Instruction

UM018809-0611

122

ZNEO

®

CPU Core

User Manual

LEA

Definition

Load Effective address

Syntax

LEA dst, src

Operation

dst

 effective address

Description

The LEA instruction is used to load the destination register with a pointer to a memory location.
If an indirect-register source operand is used, the effective address pointed to by the operand is
loaded into the destination register.

The LEA opcodes that take an immediate source operand are assembler synonyms for LD
instructions with the same opcodes. Programs can use LEA with an address operand when the
intention is to load a base address into the destination register. For more information, see the

Loading an Effective Address

section on page 33.

When the assembler encounters an LD instruction with an immediate source operand, it attempts
to use the shortest possible form, so it may be possible for some LD instructions to disassemble
as LEA.

If the offset required for the PC-based addressing mode exceeds the 14-bit signed range for that
addressing mode, the assembler may silently convert the instruction to use the 32-bit immediate
addressing mode.

Flags

Flags are not affected by this instruction.

Syntax and Opcodes

Instruction, Operands

Word 0

Word 1

Word 2

LEA Rd, soff14(PC)

{002H, Rd}

{1xB, soff14}

LEA Rd, soff14(Rs)

{48H, Rs, Rd}

{1xB, soff14}

LEA Rd, soff6(FP)

{4H, 11B, soff6, Rd}

LEA Rd, imm32

{452H, Rd}

imm[31:16]

imm[15:0]

LEA Rd, simm17

{45H, 000B, simm[16], Rd}

simm[15:0]

This manual is related to the following products: