KnowledgeBase Archive

An Archive of Early Microsoft KnowledgeBase Articles

View on GitHub

Q40783: Assembly Listing Doesn’t Match Generated Code in C

Article: Q40783
Product(s): See article
Version(s): 5.10   | 5.10
Operating System(s): MS-DOS | OS/2
Keyword(s): ENDUSER | | mspl13_c
Last Modified: 25-MAY-1989

Microsoft has received several reports that the listings generated by
the /Fc, /Fl, and /Fa options do not match the actual code in the
.OBJ or .EXE file, as viewed by CodeView.

In these cases, we have found that the file has been compiled using
different options when creating the listing than when producing the
CodeView file. In particular, adding the /Zi option causes some
changes in the generated code. As we document, /Zi turns off
optimizations that move code.

If the listing was generated without /Zi, but the .EXE being viewed in
CodeView was compiled with /Zi, there often are differences between
the CodeView listing and the printed listing.

Be sure to use EXACTLY the same options when comparing listing files
with the actual code.

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.

Copyright Microsoft Corporation 1986-2002.