Keil Logo

ENDIF Assembler Statement

Arguments
ENDIF
Description

The ENDIF statement terminates an IF-ELSE-ENDIF statement construct. When the assembler encounters an ENDIF statement, it concludes processing the IF block and resumes assembly at the point of the corresponding IF statement. Since IF blocks may be nested, this may involve continuing in another IF block. The ENDIF statement must be preceded by an IF, ELSEIF, or ELSE block.

Note

  • Do not confuse the ENDIF statement with the $ENDIF directive. They are not equivalent and they may not be used with the same symbols.
See Also

ELSE, ELSEIF, EQU, IF, LIT, SET

Example
IF (SWITCH = 1)
.
.
.
ELSEIF (SWITCH = 2)
.
.
.
ELSE
.
.
.
ENDIF
  Arm logo
Important information

This site uses cookies to store information on your computer. By continuing to use our site, you consent to our cookies.

Change Settings

Privacy Policy Update

Arm’s Privacy Policy has been updated. By continuing to use our site, you consent to Arm’s Privacy Policy. Please review our Privacy Policy to learn more about our collection, use and transfers
of your data.