MSM9110001: Whitespace Character Must Precede DUP Operator

ID Number: Q77078

6.00 6.00a | 6.00 6.00a

MS-DOS | OS/2

buglist6.00 buglist6.00a

Summary:

PROBLEM ID: MSM9110001

SYMPTOMS

When using the DUP operator in the Microsoft Macro Assembler (MASM)

versions 6.0 and 6.0a, you must place a whitespace character before

the DUP operator if using the "?" operator. If no whitespace is

present, no error message is produced by the assembler, and incorrect

code will be generated. The assembler will generate one data item for

the specified type, initialized to the value of the repeat size for the

DUP operator.

RESOLUTION

To work around the problem, place a space between the repeat size

and the DUP operator. Initializing the variable will cause a syntax

error to be generated.

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 has become available.

More Information:

The code example below generates a listing file that shows the size

generated for the respective DUP statements. It can be seen that the

first DUP operation generates 4 data bytes; however, the second

generates 1 data byte initialized to 4.

The assembler has problems parsing this statement because the DUP

operator begins with a letter (d), which is a valid radix suffix.

Sample Code

-----------

; Assemble options needed: /Fl

.MODEL SMALL

.STACK

.DATA

a db 4 dup(0)

size_a db SIZEOF a

b db 4dup(?)

size_b db SIZEOF b

.CODE

start:

mov ax,4C00H

int 21H ;Terminate Process

END start

END

Additional reference words: 6.00