Keil Logo

Standard Macro Processor

The Standard Macro Language supported by the A166 Assembler is a string replacement facility that enables you to write resuable code blocks (macros) and insert them in one or more places in your source text. The standard macro processor is very similar to macro processors found in other popular assemblers.

The macro processor views the source file differently than the assembler.

  • To the assembler, the source file is a series of directives, statements, and MCU instructions.
  • To the macro processor, the source file is a long string of characters which are processed. The macro processor scans the source file in search of calls to defined macros. Macro calls are replaced with the built-in or user-defined macro.

Combining macros with conditional assembly directives and statements, leads to compact configuration-dependent code which is critical to good program design. Additionally, it produces the most compact code possible.


  • Macro processing occurs before code is assembled. It is independent of assembly. Macro time is distinct from assembly time. Therefore, things that are known by the assembler (like assembly-language symbols, language labels, symbols defined with the SET and EQU statements, and the location counter) are unknown to the macro processor.
  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.