Keil Logo

Exiting A Macro

The EXITM directive immediately terminates a macro expansion. When this directive is detected, the macro processor stops expanding the current macro and resumes processing after the next ENDM directive. The EXITM directive is useful in conditional statements. For example:

WAIT    MACRO X            ; macro definition
        IF NUL X           ; make sure X has a value
          EXITM            ; if not then exit
        ENDIF
        REPT X             ; generate X NOP instructions
                NOP
        ENDM               ; end REPT
ENDM                       ; end MACRO
  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.