|ARM Technical Support Knowledge Articles|
Applies to: C166 C Compiler
Information in this article applies to:
What does the ASMEXPAND directive do?
The ASMEXPAND directive (abbreviated AE) instructs the C compiler to use the C preprocessor to expand all symbols used in ASM/ENDASM blocks. This is the default operation of the C166 Compiler, so you don't necessarily need to specify this directive.
The NOASMEXPAND directive (abbreviated NOAE) instructs the C compiler to avoid using the C preprocessor to expand symbols used in ASM/ENDASM blocks. When this directive is used, text between ASM and ENDASM is copied verbatim without any preprocessor expansion. Use NOASMEXPAND when symbols in your in-line assembly have the same names as defined macros.
#pragma noasmexpand #define abc 1 #define xx0 2 #define xx1 3 #pragma asm abc equ 2 ; above 'abc' not expanded xx0 equ 10 ; above 'xx0' not expanded #ifdef QQQ xx1 equ 20 #endif #pragma endasm
Article last edited on: 2000-09-07 00:00:00
Did you find this article helpful? Yes No
How can we improve this article?