LCR #22bit
6-123
LCR #22bit
Long Call Using RPC
SYNTAX OPTIONS
OPCODE
OBJMODE
RPT
CYC
LCR #22bit
0111 0110 01CC CCCC
CCCC CCCC CCCC CCCC
1
−
4
Operands
22bit
22-bit program-address (0x00 0000 to 0x3F FFFF range)
Description
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.
Flags and
Modes
None
Repeat
This instruction is not repeatable. If this instruction follows the RPT
instruction, it resets the repeat counter (RPTC) and executes only once.
Example
;
RPC call of FuncA:
LCR FuncA
; Call FuncA, return address in RPC
.
.
FuncA:
; Function A:
.
.
LRETR
; RPC return
Summary of Contents for TMS320C28x
Page 30: ...1 12...
Page 80: ...This page intentionally left blank 2 50 This page intentionally left blank...
Page 269: ...IN loc16 PA 6 112 MOV AL 0 AL 0 UOUT IORegC AL IOspace IORegC AL 10...
Page 308: ...MAXCUL P loc32 6 151 Saturate MOVL Var64 2 ACC Store result into Var64 MOVL Var64 P...
Page 509: ...SUBL ACC P PM 6 352 SUBL ACC P PM ACC S B 11 M X 4 MOVH Y ACC 5 Store Q15 result into Y...
Page 585: ...This page intentionally left blank 7 32 This page intentionally left blank...