Keil Logo

C Preprocessor

The Ax51 Assembler includes a standard C preprocessor that is identical with the macro preprocessor in the Cx51 Compiler (with a few minor exceptions).

The C preprocessor processes the source text of a source file before it is actually assembled. When the C preprocessor is enabled, C preprocessing is the first thing the assembler does. The purpose of the preprocessor is to replace or insert additional text into the source file just prior to assembly.

Most of the obvious functions of the preprocessor require activation (by including preprocessor directives) in your source code. However, there are several things the preprocessor always does:

  • Each C comment is replaced by a single space.
  • Line continuations (indicated by a backslash ('\') at the end of a line) are removed and the lines they break apart are joined for assembly.
  • Predefined macro names are replaced with their predefined text.

In addition to these operations, the C preprocessor supports the more obvious preprocessor operations:

  • Header Files,
  • Macros,
  • Conditional Compilation.

Refer to the Preprocessor in the Cx51 Compiler User's Guide for more information about the preprocessor directives that are available.

  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.