Keil Logo

Source Listing

The main body of the listing file is the formatted source listing. A section of formatted source is shown in the following.

Sample Source Listing

LOC    OBJ             LINE     SOURCE

000006 758DFD           135             MOV   TH1,#0FDH

The format for each line in the listing file depends on the source line that appears on it. Instruction lines contain 4 fields. The name of each field and its meanings is shown in the list below:

  • LOC shows the location relative or absolute (code address) of the first byte of the instruction. The value is displayed in hexadecimal.
  • OBJ shows the actual machine code produced by the instruction, displayed in hexadecimal. If the object that corresponds to the printed line is to be fixed up (it contains external references or is relocatable), an F or E is printed after the OBJ field. The object fields to be fixed up contain zeros.
  • LINE shows the INCLUDE nesting level, if any, the number of source lines from the top of the program, and the macro nesting level, if any. All values in this field are displayed in decimal numbers.
  • SOURCE shows the source line as it appears in the file. This line may be extended onto the subsequent lines in the listing file.

DB, DW, and DD directives are formatted similarly to instruction lines, except the OBJ field shows the data values placed in memory. All data values are shown. If the expression list is long, then it may take several lines in the listing file to display all of the values placed in memory. The extra lines will only contain the LOC and OBJ fields.

The directives that affect the location counter without initializing memory (e.g. ORG, DBIT, or DS) do not use the OBJ field, but the new value of the location counter is shown in the LOC field.

The SET and EQU directives do not have a LOC or OBJ field. In their place the assembler lists the value that the symbol is set to. If the symbol is defined to equal one of the registers, then REG is placed in this field. The remainder of the directive line is formatted in the same way as the other directives.

  Arm logo
Important information

This site uses cookies to store information on your computer. By continuing to use our site, you consent to our cookies.

Change Settings

Privacy Policy Update

Arm’s Privacy Policy has been updated. By continuing to use our site, you consent to Arm’s Privacy Policy. Please review our Privacy Policy to learn more about our collection, use and transfers
of your data.