FIX: MASM 6.0 May Initialize Every 256th Data SymbolLast reviewed: September 11, 1997Article ID: Q73684 |
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 may incorrectly initialize data that is intended to be uninitialized. The problem will occur with every 256th data symbol in a module that is defined using the "dup" operator.
RESOLUTIONTo work around the problem, either avoid using the dup operator when declaring a variable or limit the number of occurrences to less than 256 per module.
STATUSMicrosoft has confirmed this to be a problem in MASM version 6.0. This problem was corrected in MASM version 6.0a.
MORE INFORMATIONUninitialized data is created by specifying the ? (question mark) symbol as a value at declaration time. It is primarily used to indicate that the initial value of a data symbol is unimportant. It can also be used to indicate that a symbol is actually defined in a separate compilation module and merely serves as a place holder for this module. If a segment contains only uninitialized data, the linker can reduce the size of the resultant .EXE file by modifying the minalloc field in the header by the corresponding amount. The loader will then allocate the space at run-time and fix the addresses as required. Because the assembler incorrectly initializes some data, the segment will not be completely uninitialized; therefore, LINK copies the segment in its entirety into the .EXE file and the resulting disk file is larger than necessary.
Sample Code; Assemble options needed: none
mymac MACRO LOCAL ldat ldat DD 1 dup (?) ENDM data SEGMENT REPEAT 512 mymac ENDM data ENDS END |
Additional reference words: 6.00 buglist6.00 fixlist6.00a
© 1998 Microsoft Corporation. All rights reserved. Terms of Use. |