| |||
| Home > Assembler Reference > Using the C preprocessor | |||
You can use C preprocessor commands in your assembly language
source file. If you do this, you must preprocess the file using
the C preprocessor, before using armasm to assemble
it. See the RealView Compilation Tools Compiler User Guide for more information.
armasm correctly interprets #line commands
in the resulting file. It can generate error messages and debug_line tables
using the information in the #line commands.
Example 3.1 shows the
commands you write to preprocess and assemble a file, source.s.
In this example, the preprocessor outputs a file called preprocessed.s,
and armasm assembles preprocessed.s.
Example 3.1. Preprocessing an assembly language source file
armcc -E source.s > preprocessed.s armasm preprocessed.s