Keil™, An ARM® Company

C166 User's Guide

NOASMEXPAND Compiler Directive

Abbreviation NOAE
Arguments None.
Default ASMEXPAND
µVision Options — C166 — Misc Controls.
Description 

The NOASMEXPAND directive prevents the compiler from expanding symbols used in ASM/ENDASM blocks. Instead, text between ASM and ENDASM is copied verbatim without any preprocessor expansion. Use this directive when symbols in your in-line assembly have the same names as defined macros.

See Also ASMEXPAND
Example 
#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