LRET
6-130
LRET Long Return
SYNTAX OPTIONS OPCODE OBJMODE RPT CYC
LRET 0111 0110 0001 0100 X − 8
Operands None
Description Long return. The return address is popped, from the software stack into the
PC, in two 16-bit operations:
SP = SP – 1;
temp(31:16) = [SP];
SP = SP − 1;
temp(15:0) = [SP];
PC = temp(21:0);
Flags and
Modes
None
Note: For more efficient function calls when operating with OBJMODE = 1, use the LCR and
LRETR instructions in place of the LC and LRET instructions.
Repeat This instruction is not repeatable. If this instruction follows the RPT
instruction, it resets the repeat counter (RPTC) and executes only once.
Example
; Standard function call of FuncA:
LC FuncA ; Call FuncA, return address on stack
.
.
FuncA: ; Function A:
.
.
LRET ; Return from address on stack