BUG: ORG in STRUCT Affects Current Segment Size with -Sf (111473)
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
- Microsoft Macro Assembler (MASM) 6.1
- Microsoft Macro Assembler (MASM) 6.1a
- Microsoft Macro Assembler (MASM) 6.11
This article was previously published under Q111473 SYMPTOMS
A STRUCT declaration containing an ORG directive will change the current
segment size when the -Sf switch is used and a listing file is produced
with MASM 6.x.
CAUSE
When adding a first-pass listing (the -Sf switch) to the listing file,
MASM's internal location counter is affected when the ORG directive is
encountered within a STRUCT declaration. This location counter is
ultimately used to determine segment size.
RESOLUTION
When declaring a STRUCT that contains an ORG directive, place the
declaration outside of any open segments. Because this is a structure
declaration rather than an actual instance, the structure does not have to
be within a segment and can be placed outside all open segments where the
location counter will not be adversely affected.
STATUS
Microsoft has confirmed this to be a problem in the Microsoft Macro
Assembler (MASM) versions 6.x. We are researching this problem and will
post new information here in the Microsoft Knowledge Base as it becomes
available.
| Modification Type: | Minor | Last Reviewed: | 10/14/2003 |
|---|
| Keywords: | KB111473 |
|---|
|