These directives specify whether to assemble a specified range of lines.
The assembler controls assembly of the blocks according to the conditions specified through .IF and .ELIF.
The assembler evaluates the condition specified in the operand of .IF or .ELIF, and assembles the body in the subsequent lines when the condition is true. In this case, the lines before the .ELIF, .ELSE, or .ENDIF directive are assembled.
Any directives that can be used in an assembly-language file can be written in a conditional assembly block.
Conditional assembly is done according to the result of conditional expression evaluation.
[Examples] <Example of conditional expressions>
<Example of conditional assembly specification>
Be sure to write a conditional expression in an .IF or .ELIF directive.
Be sure to insert a space character or a tab between the .IF or .ELIF directive and the operand.
Only one conditional expression can be specified for the operand of the .IF or .ELIF directive.
Be sure to use a conditional operator in a conditional expression.
The following operators can be used.
A conditional expression is evaluated in signed 32 bits.
Symbols can be used in the left and right sides of a conditional operator.
Expressions can be used in the left and right sides of a conditional operator. For the expression format, refer to the rules described in (2) Expression in section 4.1.5, Coding of Operands.
Strings can be used in the left and right sides of a conditional operator. Be sure to enclose a string within single-quotes (') or double-quotes ("). Strings are compared in character code values.
"ABC"<"CBA" -> 414243 < 434241; this condition is true.
"C" < "A" -> 43 < 41; this condition is false.
Space characters and tabs can be written before and after conditional operators.
Conditional expressions can be specified in the operands of the .IF and .ELIF directives.
The assembler does not check if the evaluation result is outside the allowed range.
Forward reference symbols (reference to a symbol that is defined after this directive line) must not be specified.
If a forward reference symbol or an undefined symbol is specified, the assembler assumes the symbol value as 0 when evaluating the expression.