User manual
ABSLIST ST Assembler-Linker
48/89 Doc ID 11392 Rev 4
7 ABSLIST
7.1 Overview
As the list file with absolute addresses generated by the assembler from the source file and
the map file (ASM ex1.asm -fi=ex.map) may show differences with the actually generated
code, a post processor has been written to be sure that the list file will be coherent with the
executable file.
ABSLIST is a post processor which reads a list file with relative addresses and unresolved
symbols and converts it into a list file with absolute addresses and resolved symbols. For
this, the post processor needs information which is located in two files generated by the
linker: the map file and the executable file in Motorola S-record format (.s19) or in Intel Hex
format (.hex).
This is possible because the linker does not optimize the code generated by the assembler.
The list file with relative addresses is generated by the assembler and it must include
symbols.
Thus the following assembler command must be executed first, to generate a list file with
relative addresses and including a symbol list:
asm -sym file1.asm -li=Debug\file1.lsr
Such a list file is composed of two parts:
● A list of assembler instructions with addresses, codes and mnemonics,
● A list of labels.
To transform relative addresses for instructions and labels, the postprocessor adds to the
relative address the start address of the corresponding segment.
The segment start address is found in the segment list of the map file.
As for the list of relative labels, there are two cases:
● Public labels: their absolute addresses can be found in the external label list of the map
file.
● Private labels: as for the instructions, the start address of the corresponding segment
must be added to the relative address.
The segment corresponding to an instruction is the last segment which has been declared
in the source file.
It is the same for a local label, so a list of labels with the segments where they are defined
must be constituted as the list file is parsed.
To generate the code for instructions with unresolved labels (subroutine calls, variable read
or write accesses), the final code is read in the executable file.