DOCUMENT:Q76163 06-MAY-2001 [masm] TITLE :Line Numbers in .MAP File Do Not Relate to Listing File PRODUCT :Microsoft Macro Assembler PROD/VER:MS-DOS:5.0,5.10,5.10a OPER/SYS: KEYWORDS: ====================================================================== ------------------------------------------------------------------------------- The information in this article applies to: - Microsoft Macro Assembler (MASM), versions 5.0, 5.10, 5.10a ------------------------------------------------------------------------------- SUMMARY ======= When using the Microsoft Macro Assembler (MASM) version 5.0, 5.1, or 5.1a and generating a cross-reference file, the listing file generated will contain line numbers. These line numbers do not relate to the line numbers listed in the .MAP file when specifying the /LINE linker option. The line number information generated in the .MAP file with the /LINE option relates to the source file and not to the listing file. Therefore, relying on the .MAP file to give information relating to assembler-generated listing file is not valid because listing files contain added information. MORE INFORMATION ================ The sample code below contains two NOP statements to show executable code lines. The .MAP file contains line number information corresponding to the source file's executable lines. This is the intended use of the line number information generated by the .MAP file. It is not intended for these line numbers to relate to the lines of the listing file. TEST.ASM: ; Assemble options needed: /Zd /c /l ; Link options needed: /L .MODEL SMALL .STACK 100H .CODE start: nop nop END start TEST.MAP: Start Stop Length Name Class 00000H 00001H 00002H _TEXT CODE 00002H 00002H 00000H _DATA DATA 00010H 0010FH 00100H STACK STACK Origin Group 0000:0 DGROUP Address Publics by Name Address Publics by Value Line numbers for TEST.OBJ(test.asm) segment _TEXT 5 0000:0000 6 0000:0001 Program entry point at 0000:0000 Additional query words: kbinf 5.00 5.10 5.10a ====================================================================== Keywords : Technology : kbMASMsearch kbAudDeveloper kbMASM500 Version : MS-DOS:5.0,5.10,5.10a ============================================================================= 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 2001.