Directives that can be omitted in pass 2 of the assembler

Most directives must appear in both passes of the assembly process. There are a number of directives that can be omitted from pass 2, but doing this is strongly discouraged. Directives that can be omitted from pass 2 are:

Note

Macros that appear only in pass 1 and not in pass 2 must contain only the above directives.

For example, the code in Example 3 assembles without error although the ASSERT directive does not appear in pass 2.

Example 3. ASSERT directive appears in pass 1 only

    AREA ||.text||,CODE 
x   EQU 42
    IF :LNOT: :DEF: sym
        ASSERT x == 42
    ENDIF
sym EQU 1
    END

Directives that appear in pass 2 but do not appear in pass 1 cause an assembly error. However, this does not cause an assembly error when using the ELSE and ELIF directives if their matching IF directive appears in pass 1. Example 4 assembles without error because the IF directive appears in pass 1.

Example 4. Use of ELSE and ELIF directives

    AREA ||.text||,CODE 
x   EQU 42
    IF :DEF: sym
    ELSE
        ASSERT x == 42
    ENDIF
sym EQU 1
    END

Show/hideSee also

Copyright © 2010-2011 ARM. All rights reserved.ARM DUI 0473C
Non-ConfidentialID080411