Lea - Motorola DSP56800 Manual

16-bit digital signal processor
Table of Contents

Advertisement

LEA

Operation:
ea → D
(no parallel move)
Description: The address calculation specified is executed and the resulting effective address (ea) is stored in the
destination register (D). The source address register and the update mode used to compute the updated
address are specified by the effective address. The source address register specified in the effective ad-
dress is not updated. All update addressing modes may be used. The new register contents are available
for use by the immediately following instruction.
Example:
LEA
Before Execution
R0
N
M01
Explanation of Example:
Prior to execution, the 16-bit address register R0 contains the value $8001, the 16-bit address register
N contains the value $0C01, and the 16-bit modulo register M01 contains the value $1000. Execution
of the LEA (R0)+N instruction adds the contents of the R0 register to the contents of the N register
and stores the resulting updated address in the R0 address register. The addition is performed using
modulo arithmetic since it is done with the R0 register and M01 is not equal to $FFFF. No wraparound
occurs during the addition because the result falls within the boundaries of the modulo buffer.
Condition Codes Affected:
The condition codes are not affected by this instruction.
Instruction Fields:
Operation
LEA
Timing:
2+ea oscillator clock cycles
Memory:
1+ea program words
A-92
Load Effective Address
Assembler Syntax:
LEA
(R0)+N
; update R0 using (R0)+N
8001
0C01
1000
Operands
C
(Rn)+
2
(Rn)-
2
(Rn)+N
2
(R2+xx)
2
(SP-xx)
2
(Rn+xxxx)
4
DSP56800 Family Manual
ea
After Execution
R0
N
M01
W
1
Increment the Rn pointer register
1
Decrement the Rn pointer register
1
Add first operand to the second and store the result
in the second operand
1
Add a 6-bit unsigned immediate value to R2 and
store in the R2 Pointer
1
Subtract a 6-bit unsigned immediate value from SP
and store in the SP register
2
Add a 16-bit signed immediate value to the specified
source register.
LEA
8C02
0C01
1000
Comments

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents