MSM9201008: MASM 6.0 May Incorrectly Generate A2032 for EQU

ID Number: Q80120

6.00 6.00a | 6.00 6.00a

MS-DOS | OS/2

buglist6.00 buglist6.00a

Summary:

PROBLEM ID: MSM9201008

SYMPTOMS

The Microsoft Macro Assembler may incorrectly generate the

following error:

A2032: invalid use of register

CAUSE

This is demonstrated on lines eight and nine in the sample code

below. The error occurs because the LEA and MOV instructions on

those lines use an equate and a register as an address. In the

example, table1 is equated to the value of the location counter,

"$", and the register is bp.

RESOLUTION

To work around the problem, use the LABEL directive rather than an

equate of the current location counter.

STATUS

Microsoft has confirmed this to be a problem in MASM versions 6.0

and 6.0a. We are researching this problem and will post new

information here as it becomes available.

More Information:

Sample Code

-----------

; Assemble options needed: none

code SEGMENT word public 'code'

ASSUME cs:code

table1 EQU $

;table1 LABEL word ; Use this line instead of previous one.

table2 DW 0

LEA di, table1[bp] ; line 8

MOV ax, table1[bp] ; line 9

code ENDS

END

Additional reference words: 6.00