5.6.1 List File Format
The assembly list files arrange the content into columns, with the general form:
line [address] [data]
Each line of the list file has a line number. These numbers relate only to the list file itself and are not associated with the lines numbers in the assembly source file from which the list was generated.
The address, if present, is the address at which any output will appear in the device. This may be a program or data space address, which is determined by the psect in which the line is part of. Look for the first psect directive above the line in question.
The data, if present, represents what is associated with the specified
address. If this is an instruction opcode, then the mnemonic for that instruction is
shown. Lines that represent lables or content in data memory typically do not show the
data field, as there is no assembler output corresponding to those lines. The data can
also be a comment, which begins with a semicolon, ;
, or an assembler
directive.
movlw
instruction, whose opcode is 0E50 at address 746E in program memory and which appears on
line 51135 of the list file; the DS
directive which reserves data space
memory at address
100.
51131 PSECT brText,class=CODE,space=0,reloc=2
51132 ; Clear objects in BANK1
51133 GLOBAL bank1Data
51134 00746A EE01 F000 lfsr 0,bank1Data
51135 00746E 0E50 movlw 80
51136 007470 clear:
51137 007470 6AEE clrf postinc0,c
51138 007472 06E8 decf wreg
51139 007474 E1FD bnz clear
51140 007476 0012 return
51141 007452 PSECT bank1,class=BANK1,space=1,noexec
51142 bank1Data:
51143 000100 input:
51144 000100 DS 2
Provided that the link stage has successfully concluded, the listing file is updated by
the linker so that it contains absolute addresses and symbol values. Thus, you can use
the assembler list file to determine the position and exact opcodes of instructions.
Tick marks “'
” in the assembly listing, next to addresses or opcodes,
indicate that the linker did not update the list file, most likely due to a build error,
or a assembler option that stopped compilation before the link stage. For example, in
the following listing:
85 000A' 027F subwf 127,w
86 000B' 1D03 skipz
87 000C' 2800' goto u15
These marks indicate that addresses are just address offsets into their enclosing psect, and that opcodes have not been fixed up. Any address field in the opcode that has not been fixed up is shown with a value of 0.