Conditions
5-3
Structure of Assembly Code
5.3
Conditions
Five registers on the ’C62x/’C67x are available for conditions: A1, A2, B0, B1,
and B2. Six registers on the ’C64x are available for conditions: A0, A1, A2, B0,
B1, and B2. Figure 5–3 shows the position of a condition in a line of assembly
code.
Figure 5–3. Conditions in Assembly Code
label:
[condition]
instruction
unit
operands ; comments
parallel bars
All ’C6000 instructions are conditional:
-
If no condition is specified, the instruction is always performed.
-
If a condition is specified and that condition is true, the instruction
executes. For example:
With this condition ...
The instruction executes if ...
[A1]
A1 ! = 0
[!A1]
A1 = 0
-
If a condition is specified and that condition is false, the instruction does
not execute.
With this condition ...
The instruction does not execute if ...
[A1]
A1 = 0
[!A1]
A1! = 0