Line Numbers in .MAP File Do Not Relate to Listing File

ID: Q76163


The information in this article applies to:
  • Microsoft Macro Assembler for MS-DOS and OS/2, 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 :
Version : MS-DOS:5.0,5.10,5.10a
Platform : MS-DOS
Issue type :


Last Reviewed: January 4, 2000
© 2000 Microsoft Corporation. All rights reserved. Terms of Use.