Jcc - Motorola DSP56800 Manual

16-bit digital signal processor
Table of Contents

Advertisement

Jcc

Operation:
→ PC
If cc, then label
→ PC
else PC+1
Description: If the specified condition is true, program execution continues at the effective address specified in the
instruction. If the specified condition is false, the PC is incremented and program execution continues
sequentially. The effective address is a 16-bit absolute address. The Bcc instruction, which is more
compact, operates almost identically, and can be used for very short jumps.
The term "cc" specifies the following:
CC (HS*)— carry clear (higher or same)
CS (LO*)— carry set (lower)
EQ — equal
GE — greater than or equal
GT — greater than
LE — less than or equal
LT — less than
NE — not equal
NN — not normalized
NR — normalized
* Only available when CC bit set in the OMR
X
+
Ý
Example:
LABEL
Explanation of Example:
In this example, if C is one when executing the JCS instruction, program execution skips the two
INCW instructions and continues with the ADD instruction. If the specified condition is not true, no
jump is taken, the program counter is incremented by one, and program execution continues with the
first INCW instruction. The Jcc instruction uses a 16-bit absolute address for this example.
Restrictions:
A Jcc instruction used within a DO loop cannot begin at the LA or LA-1 within that DO loop.
A Jcc instruction cannot be repeated using the REP instruction.
A-88
Jump Conditionally
"cc" Mnemonic
denotes the logical complement of X
denotes the logical OR operator
denotes the logical AND operator
denotes the logical exclusive OR operator
JCS
LABEL ; jump to label if carry bit is set
INCW
A
INCW
A
ADD
B,A
DSP56800 Family Manual
Assembler Syntax:
Jcc
xxxx
Condition
C=0
C=1
Z=1
N ⊕ V=0
Z+(N ⊕ V)=0
Z+(N ⊕ V)=1
N ⊕ V=1
Z=0
Z+(U
E)=0
Z+(U
E)=1
Jcc

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents