Keil Logo

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
  Arm logo
Important information

This site uses cookies to store information on your computer. By continuing to use our site, you consent to our cookies.

Change Settings

Privacy Policy Update

Arm’s Privacy Policy has been updated. By continuing to use our site, you consent to Arm’s Privacy Policy. Please review our Privacy Policy to learn more about our collection, use and transfers
of your data.