Share via


ARM Directives for Conditional Assembly (Windows CE 5.0)

Send Feedback

The ARM assembler supports conditional assemblies for sections of a source file; that is, it assembles the specified sections if certain conditions are true.

In addition, the assembler supports WHILE...WEND directives for conditional looping that are useful for generating repetitive tables.

Conditional looping produces an assembly-time loop, not a run-time loop. Because the test for the WHILE condition is made at the top of the loop, it is possible that no code is generated during assembly; lines are listed as for conditional assembly.

The following ARM assembler directives are required for conditional and repetitive assembly.

Directive Description
[ or IF Marks the start of the condition.
] or ENDIF Marks the end of the condition.
| or ELSE Provides an else construct.
WHILE Marks the start of the repetitive condition.
WEND Marks the end of the repetitive condition.

Note   The characters [, |, and ] cannot be the first character in a line. These characters must be preceded by a space or a tab.

The following code shows the syntax for conditional assembly.

[ logical-expression
...code...
|
...code...
]

The following code shows the syntax for repetitive assembly.

WHILE logical-expression
...code...
WEND

See Also

ARM Assembler Directives

Send Feedback on this topic to the authors

Feedback FAQs

© 2006 Microsoft Corporation. All rights reserved.