Microsoft KB Archive/87548

= FIX: Upper Half of 32-bit Registers, GS, and FS Corrupt =

Article ID: 87548

Article Last Modified on 10/23/2003

-

APPLIES TO


 * Microsoft CodeView for MS-DOS
 * Microsoft CodeView 4.1

-



This article was previously published under Q87548



SYMPTOMS
When single-stepping or tracing through code in Microsoft CodeView versions 4.0, 4.01, and 4.05, the lower half of the 32-bit registers (eax, ebx, edi, etc.) is always preserved, but the upper half may be corrupted. Other 386- specific registers, such as the gs and fs registers, may also be corrupted. This problem also occurs when animating. This problem does not occur if the instructions are not executed one at a time.



STATUS
Microsoft has confirmed this to be a problem in CodeView version 4.0, 4.01, and 4.05. This problem was corrected in CodeView version 4.1.



MORE INFORMATION
The following sample code can be used to demonstrate this problem. The ebx register will get the value FFFFFFFF, but single-stepping on the NOP will change the value to 0000FFFF.

Sample Code

 * Assemble options needed: /Zi

_text SEGMENT para public 'code' ASSUME cs:_text, ds:_text main: .386

MOV ebx, 0ffffffffh NOP

MOV ah, 4ch INT 21h _text ENDS

stack SEGMENT para stack 'stack' DW 64 dup( ? ) stack ENDS

END main

Additional query words: 4.00

Keywords: kbfix kb16bitonly KB87548

-

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

© Microsoft Corporation. All rights reserved.