ARM Technical Support Knowledge Articles

CONDITIONAL ASSEMBLY CODE

Applies to: A51 Macro Assembler

Answer


Information in this article applies to:


QUESTION

Is it possible to do conditional assembly with the A51 assembler? If so, why won't statements like the following work?

IF USE_SIMULATION == ENABLED

ANSWER

To create conditional assembly programs, you must use the $IF and $ENDIF directives in your assembly program with symbols you define with $SET or $RESET or symbols you define on the command line. IF does not work with those types of defined symbols. The following code:

$IF (USE_SIMULATION = ENABLED)
        nop
        nop
        nop
$ENDIF

should work as expected.

SEE ALSO

Article last edited on: 2004-06-07 23:36:53

Rate this article

[Bad]
|
|
[Good]
Disagree? Move your mouse over the bar and click

Did you find this article helpful? Yes No

How can we improve this article?

Link to this article
Copyright © 2011 ARM Limited. All rights reserved. External (Open), Non-Confidential