The information in this article applies to:
SYMPTOMSAn attempt to use scaled index base (SIB) indirect operands may fail. If EBP is used and the stack and data segments do not have the same base address, the generated code executes incorrectly. In addition, if EBP is used as the index register, it is coded as the base register, which generates an additional byte in the instruction encoding. CAUSE
When the code does not use a scaling factor, the Microsoft Macro
Assembler (MASM) may reverse the base and index registers. When this
occurs, MASM incorrectly treats the first register as the index and
the second register as the base in an SIB indirect operand.
RESOLUTIONTo work around this problem, use a scaling factor to explicitly indicate which register is the index register. The sample below demonstrates this procedure. STATUSMicrosoft has confirmed this to be a problem in MASM versions 6.0, 6.0a, 6.0b, 6.1, 6.1a, and 6.11. We are researching this problem and will post new information here in the Microsoft Knowledge Base as it becomes available. MORE INFORMATIONWhen the code does not use a scaling factor, MASM should treat the first register as the base and the second register as the index in an SIB indirect operand. Note that the code must use the .386 or .486 directives to use an SIB indirect operand. One of these directives must be present to demonstrate the problem above. Sample Code
Additional query words: 6.00 6.00a 6.00b 6.10 6.10a indirection 32-bit buglist6.00a buglist6.00b buglist6.10 buglist6.10a buglist6.11
Keywords : |
Last Reviewed: January 6, 2000 © 2000 Microsoft Corporation. All rights reserved. Terms of Use. |