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 0 Accumulator less than or equal to zero
GT ACC > 0 Accumulator greater than zero
GEQ ACC 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.