SPNU118Z September 1995 – March 2023 66AK2E05 , 66AK2H06 , 66AK2H12 , 66AK2H14 , AM1705 , AM1707 , AM1802 , AM1806 , AM1808 , AM1810 , AM5K2E04 , OMAP-L132 , OMAP-L137 , OMAP-L138 , SM470R1B1M-HT , TMS470R1A288 , TMS470R1A384 , TMS470R1A64 , TMS470R1B1M , TMS470R1B512 , TMS470R1B768
Conditional assembly directives enable you to instruct the assembler to assemble certain sections of code according to a true or false evaluation of an expression. Two sets of directives allow you to assemble conditional blocks of code:
|
||
.if condition | marks the beginning of a conditional block and assembles code if the .if condition is true. | |
[.elseif condition] | marks a block of code to be assembled if the .if condition is false and the .elseif condition is true. | |
.else | marks a block of code to be assembled if the .if condition is false and any .elseif conditions are false. | |
.endif | marks the end of a conditional block and terminates the block. | |
|
||
.loop [count] | marks the beginning of a repeatable block of code. The optional expression evaluates to the loop count. | |
.break [end condition] | tells the assembler to assemble repeatedly when the .break end condition is false and to go to the code immediately after .endloop when the expression is true or omitted. | |
.endloop | marks the end of a repeatable block. | |
The assembler supports several relational operators that are useful for conditional expressions. For more information about relational operators, see Section 4.9.2. |