FIX: Using a Higher Processor Directive in a Macro Causes A2006 (72887)
The information in this article applies to:
- Microsoft Macro Assembler (MASM) 6.0
- Microsoft Macro Assembler (MASM) 6.0a
- Microsoft Macro Assembler (MASM) 6.0b
This article was previously published under Q72887 SYMPTOMS
When you attempt to use a symbol in your assembly code without
defining it first, the Microsoft Macro Assembler (MASM) generates the
following error:
error A2006: undefined symbol : 'identifier'
However, MASM may also incorrectly generate this error when you use a
processor directive in a macro if the processor specified is higher
than the one currently defined.
RESOLUTION
To work around the problem, declare a processor type of sufficient
level to execute the instructions in the macro before calling the
macro. The comment in the sample code below demonstrates this by
declaring the .286 directive before the macro is called.
STATUS
Microsoft has confirmed this to be a problem in MASM versions 6.0,
6.0a, and 6.0b. This problem was corrected in MASM for MS-DOS version
6.1.
Modification Type: | Major | Last Reviewed: | 10/22/2003 |
---|
Keywords: | kbfix KB72887 |
---|
|