Keil Logo

Predefined Macros

The Ax51 Assembler provides the following predefined constants you may use in preprocessor directives and assembler code to create portable programs.

Constant Description
__A51__ Version number of the A51 Assembler (for example, 710 for version 7.10).
__AX51__ Version number of the AX51 Assembler (for example, 212 for version 2.12).
__DATE__ Date when the assembly was started in ANSI format (month dd yyyy).
__DATE2__ Date when the compilation was started in short form (mm/dd/yy).
__FILE__ Name of the file being assembled.
__KEIL__ Set to 1 to indicate the KEIL A51 Assembler.
__LINE__ Current line number in the file being assembled.
__MOD_CONT__ AX51 is generating code in Dallas 24-bit contiguous mode enabled with the MOD_CONT Assembler Directive.
__TIME__ Time when the assembly was started.


  • There are two (2) leading and trailing underscore characters ('_') used for the predefined constants.
  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.