Texas Instruments TMS320C28x Reference Manual page 280

Dsp cpu and instruction set
Table of Contents

Advertisement

LCR #22bit
SYNTAX OPTIONS
LCR #22bit
Operands
22bit
Description
Flags and
Modes
Repeat
Example
;
RPC call of FuncA:
LCR
FuncA:
LRETR
22-bit program-address (0x00 0000 to 0x3F FFFF range)
Long call using return PC pointer (RPC). The current RPC value is pushed
onto the software stack, pointed to by SP register, in two 16-bit operations.
Next, the RPC register is loaded with the return address. Next, the 22-bit
immediate destination address is loaded into the PC:
[SP] = RPC(15:0);
SP = SP + 1;
[SP] = RPC(21:16);
SP = SP + 1;
RPC
= PC + 2;
PC
= 22bit;
Note:
The LCR and LRETR operations, enable 4 cycle call and 4 cycle return. The standard
LC and LRET operations only enable a 4 cycle call and 8 cycle return. The LCR and
LRETR operations can be nested and can freely replace the LC and LRET operations.
This is the case on interrupts also. Only on a task switch operation, does the RPC need
to be manually saved and restored.
None
This instruction is not repeatable. If this instruction follows the RPT
instruction, it resets the repeat counter (RPTC) and executes only once.
FuncA
.
.
.
.
OPCODE
0111 0110 01CC CCCC
CCCC CCCC CCCC CCCC
; Call FuncA, return address in RPC
; Function A:
; RPC return
LCR #22bit
Long Call Using RPC
OBJMODE
RPT
CYC
1
4
6-123

Hide quick links:

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the TMS320C28x and is the answer not in the manual?

Table of Contents

Save PDF