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

Last reviewed: September 16, 1997
Article ID: Q87548
4.00 4.01 4.05 | 4.00 4.01
MS-DOS         | WINDOWS
kbtool kbcode kbbuglist kbfixlist

The information in this article applies to:

  • Microsoft CodeView for MS-DOS, versions 4.0, 4.01, and 4.05
  • Microsoft CodeView for Windows, versions 4.0, 4.01

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 reference words: 4.00
KBCategory: kbtool kbcode kbbuglist kbfixlist
KBSubcategory: CvwIss
Keywords : kb16bitonly
Solution Type : kbfix


THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

Last reviewed: September 16, 1997
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.