Conditional branches, calls, and returns, Using multiple conditions, 4 conditional branches, calls, and returns – Texas Instruments TMS320C2XX User Manual

Page 109

Advertising
background image

Conditional Branches, Calls, and Returns

5-10

5.4

Conditional Branches, Calls, and Returns

The ’C2xx provides branch, call, and return instructions that will execute only
if one or more conditions are met. You specify the conditions as operands of
the conditional instruction. Table 5–3 lists the conditions that you can use with
these instructions and their corresponding operand symbols.

Table 5–3. Conditions for Conditional Calls and Returns

ББББББ

ББББББ

Operand
Symbol

БББББ

БББББ

Condition

ББББББББББББББ

ББББББББББББББ

Description

ББББББ

Б

ББББ

Б

ББББББ

EQ

БББББ

Б

БББ

Б

БББББ

ACC = 0

ББББББББББББББ

Б

ББББББББББББ

Б

ББББББББББББББ

Accumulator equal to zero

ББББББ

ББББББ

NEQ

БББББ

БББББ

ACC

0

ББББББББББББББ

ББББББББББББББ

Accumulator not equal to zero

ББББББ

ББББББ

LT

БББББ

БББББ

ACC < 0

ББББББББББББББ

ББББББББББББББ

Accumulator less than zero

ББББББ

ББББББ

LEQ

БББББ

БББББ

ACC

v

0

ББББББББББББББ

ББББББББББББББ

Accumulator less than or equal to zero

ББББББ

Б

ББББ

Б

ББББББ

GT

БББББ

Б

БББ

Б

БББББ

ACC > 0

ББББББББББББББ

Б

ББББББББББББ

Б

ББББББББББББББ

Accumulator greater than zero

ББББББ

ББББББ

GEQ

БББББ

БББББ

ACC

w

0

ББББББББББББББ

ББББББББББББББ

Accumulator greater than or equal to zero

ББББББ

ББББББ

C

БББББ

БББББ

C = 1

ББББББББББББББ

ББББББББББББББ

Carry bit set to 1

ББББББ

ББББББ

NC

БББББ

БББББ

C = 0

ББББББББББББББ

ББББББББББББББ

Carry bit cleared to 0

ББББББ

Б

ББББ

Б

ББББББ

OV

БББББ

Б

БББ

Б

БББББ

OV = 1

ББББББББББББББ

Б

ББББББББББББ

Б

ББББББББББББББ

Accumulator overflow detected

ББББББ

ББББББ

NOV

БББББ

БББББ

OV = 0

ББББББББББББББ

ББББББББББББББ

No accumulator overflow detected

ББББББ

ББББББ

BIO

БББББ

БББББ

BIO low

ББББББББББББББ

ББББББББББББББ

BIO pin is low

ББББББ

Б

ББББ

Б

ББББББ

TC

БББББ

Б

БББ

Б

БББББ

TC = 1

ББББББББББББББ

Б

ББББББББББББ

Б

ББББББББББББББ

Test/control flag set to 1

ББББББ

ББББББ

NTC

БББББ

БББББ

TC = 0

ББББББББББББББ

ББББББББББББББ

Test/control flag cleared to 0

5.4.1

Using Multiple Conditions

Multiple conditions can be listed as operands of the conditional instructions.
If multiple conditions are listed, all conditions must be met for the instruction
to execute. Note that only certain combinations of conditions are meaningful.
See Table 5–4. For each combination, the conditions must be selected from
Group 1 and Group 2 as follows:

-

Group 1. You can select up to two conditions. Each of these conditions
must be from a different category (A or B); you cannot have two conditions
from the same category. For example, you can test EQ and OV at the same
time, but you cannot test GT and NEQ at the same time.

Advertising