FIX: COMM Directive Produces Error If Count Field Not SpecifiedLast reviewed: September 11, 1997Article ID: Q74221 |
6.00 | 6.00
MS-DOS | OS/2
kbtool kbfixlist kbbuglist
The information in this article applies to:
SYMPTOMSThe Microsoft Macro Assembler (MASM) version 6.0 will produce a syntax error when multiple variables (separated by commas) are listed following a COMM directive if any variable, except the last one in the list, does not have a count field specified. For example, assembling sample code #1 with MASM 6.0 produces the following error:
error A2008: syntax error: decWhen assembling sample code #2, MASM 6.0 produces this error:
error A2008: syntax error: inc RESOLUTIONThe following methods may be used to work around these problems:
STATUSMicrosoft has confirmed this to be a problem in MASM version 6.0. This problem was corrected in MASM version 6.0a.
MORE INFORMATIONThe sample code below illustrates this problem. MASM version 5.1 and 5.1a assemble the code without any errors. According to the BNF Grammar in Appendix B of the "Microsoft Macro Assembler Programmer's Guide," this should also assemble correctly with MASM version 6.0.
Sample Code #1; Assemble options needed: none .MODEL small .DATA COMM NEAR var1:WORD, var2:WORD ; This doesn't work ; COMM NEAR var1:WORD:1, var2:WORD ; This works END Sample Code #2; Assemble options needed: none .MODEL small .DATA COMM NEAR var1:WORD, var2:WORD, var3:WORD ; This doesn't work; COMM NEAR var1:WORD:1, ; var2:WORD:1, var3:WORD:1 ; This works END |
Additional reference words: 6.00 buglist6.00 fixlist6.00a
© 1998 Microsoft Corporation. All rights reserved. Terms of Use. |