.elseif

Starts an optional, alternative conditional assembly block, adding another boolean-expression condition.

  .elseif bool-expr statement-group
  
Parameters

bool-expr

Any boolean expression.

statement-group

Any valid assembly statements.

Remarks

This directive must be part of an .if ... .elseif ... [.else] ... .endif conditional structure (with each of these directives starting a new line). The assembler processes the assembly statements that .elseif introduces only if (1) the bool-expr condition of the .if directive is false, and (2) the bool-expr condition of the .elseif directive is true.

For a logical structure of multiple levels, you can use the .elseif directive several times, as in this pattern:

  .if bool-expr-1
      statement-group-1
  .elseif bool-expr-2
      statement-group-2
  .elseif bool-expr-3
      statement-group-3
  .elseif bool-expr-4
      statement-group-4
  .else
      statement-group-5
  .endif