XRETC COND
XRETC COND
SYNTAX OPTIONS
XRETC COND
Operands
COND
Description
Flags and
V
Modes
Repeat
6-392
0101 0110 1111 COND
Conditional codes:
COND
Syntax
Description
0000
NEQ
Not Equal To
0001
EQ
Equal To
0010
GT
Greater Then
0011
GEQ
Greater Then Or Equal To
0100
LT
Less Then
0101
LEQ
Less Then Or Equal To
0110
HI
Higher
0111
HIS, C
Higher Or Same, Carry Set
1000
LO, NC
Lower, Carry Clear
1001
LOS
Lower Or Same
1010
NOV
No Overflow
1011
OV
Overflow
1100
NTC
Test Bit Not Set
1101
TC
Test Bit Set
1110
NBIO
BIO Input Equal To Zero
1111
UNC
Unconditional
Return conditionally. If the specified condition is true, a 16-bit value is
popped from the stack and stored into the low 16 bits of the PC while the
upper 6 bits of the PC are forced to 0x3F; Otherwise, execution continues
with the instruction following the XRETC operation:
if(COND = true)
{
SP = SP − 1;
PC = 0x3F:[SP];
}
else
PC = PC + 1;
Note:
This instruction can only transfer program control to a location located in the upper 64K
range of program space (0x3F0000 to 0x3FFFFF). To return from a call made by
XCALL, the XRETC instruction must be used. The cycle times for this operation are:
If (COND = true) then the instruction takes 7 cycles.
If (COND = false) then the instruction takes 4 cycles.
If the V flag is tested by the condition, then V is cleared.
This instruction is not repeatable. If this instruction follows the RPT
instruction, it resets the repeat counter (RPTC) and executes only once.
C2xLP Source-Compatible Conditional Return
OPCODE
OBJMODE
RPT
CYC
1
−
4/7
Flags Tested
Z = 0
Z = 1
Z = 0 AND N = 0
N = 0
N = 1
Z = 1 OR N = 1
C = 1 AND Z = 0
C = 1
C = 0
C = 0 OR Z = 1
V = 0
V = 1
TC = 0
TC = 1
BIO = 0
−
Need help?
Do you have a question about the TMS320C28x and is the answer not in the manual?