FIX: Illegal Instruction from Structure Member Offset (80116)
The information in this article applies to:
- Microsoft Macro Assembler (MASM) 5.1
- Microsoft Macro Assembler (MASM) 5.1a
This article was previously published under Q80116 SYMPTOMS
In the Microsoft Macro Assembler (MASM) versions 5.1 and 5.1a, if the
offset of a structure template member is used as a 32-bit operand, the code
generated may be incorrect. This will cause the program to hang or generate
an illegal instruction message in CodeView.
CAUSE
The problem occurs when the offset of a structure template member is being
used as a 32-bit immediate value, and the member's offset is greater than
100h. If the offset is greater than 100h, the code generated will not
contain the 66h prefix byte, which makes the instruction a 32-bit
operation.
RESOLUTION
Embed the 66h byte by using the DB directive, as shown in the example
below.
STATUS
Microsoft has confirmed this to be a problem in MASM version 5.1 and 5.1a.
This problem was corrected in MASM version 6.0.
Modification Type: | Major | Last Reviewed: | 10/16/2003 |
---|
Keywords: | kbfix KB80116 |
---|
|