ARM Technical Support Knowledge Articles

MACROS ARE NOT EXPANDED

Applies to: A51 Macro Assembler

Answer

Information in this article applies to:


SYMPTOMS

I am using the 8051 A51 assembler version 5.10, and have just tried assembling a file with the following lines as a test:

REPT 3
  NOP
ENDM

Upon examining the list file, the repeated lines seem to have been ignored by the assembler.

CAUSE

The GEN assembler directive must be used to include the MACRO expansions in the listing file.

The GENONLY assembler directive must be used to include the first level MACRO expansion.

If neither of these directives is used, MACRO expansions are not listed in the listing file.

RESOLUTION

Add the GEN directive to your A51 command line to include the macro expansion in your listing file. If you don't include that directive, the macro expansions are performed but they are not printed in the list file. For example:

A51 mycode.a51 GEN

SEE ALSO

Article last edited on: 2004-11-23 15:47:09

Rate this article

[Bad]
|
|
[Good]
Disagree? Move your mouse over the bar and click

Did you find this article helpful? Yes No

How can we improve this article?

Link to this article
Copyright © 2011 ARM Limited. All rights reserved. External (Open), Non-Confidential