Microsoft KB Archive/103721

= FIX: Prefix Bytes Are Order-Dependent in CodeView 4.0x =

Article ID: 103721

Article Last Modified on 9/30/2003

-

APPLIES TO


 * Microsoft CodeView 4.0
 * Microsoft CodeView 4.01

-



This article was previously published under Q103721



SYMPTOMS
The disassembler, which is used to display mixed source and assembly or assembly in CodeView, is sensitive to the order in which the 66h and 67h prefix bytes occur in 32-bit instructions. If the order is 67h 66h, then the instruction is disassembled as:

67668B03 MOV AX,WORD PTR [EBX]

CodeView incorrectly shows AX as the destination operand. However, if the order is 66h 67h, then the instruction is disassembled as:

66678B03 MOV EAX,DWORD PTR [EBX]

In this case, CodeView correctly shows EAX. The MASM version 6.x program shown below demonstrates the problem.



STATUS
Microsoft has confirmed this to be a problem in CodeView versions 4.0 and 4.01. The problem was corrected in CodeView version 4.1.

Sample Code
; Assemble options needed: /Zi

.MODEL small .386

.STACK 4096

.CODE .startup loc1: mov eax, [ebx] loc2: ORG loc1 DB 66h, 67h   ; This forces the prefix bytes to 66h 67h ORG loc2 loc3: mov eax, [ebx] loc4: ORG loc3 DB 67h, 66h   ; This forces the prefix bytes to 67h 66h ORG loc4 .exit 0 END

Additional query words: reverse 4.00

Keywords: kbfix kb16bitonly KB103721

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.