Keil Logo


The preprocessor built into the Cx51 Compiler processes the source text of a source file before it is actually compiled into machine language and object code. Preprocessing is the first action the compiler performs. The preprocessor's purpose is to replace or insert additional text into the source file just prior to compilation.

Most of the preprocessor functions require activation by including Preprocessor Directives in your source code. However, the preprocessor always:

  • Replaces each C comment by a single space.
  • Removes line continuations (indicated by a backslash ('\') at the end of a line) are removed and joins the lines broken apart for compilation.
  • Replaces predefined macro names with their predefined text.

In addition to these operations, the preprocessor in the Cx51 Compiler supports the more obvious preprocessor operations:

If you encounter preprocessor problems, you may direct the compiler to generate a Preprocessor File that shows the exact output from the preprocessor.

  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.