EasyManua.ls Logo

ST ST7 - Object Files; Listing Files

ST ST7
317 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
164/317
6 - STMicroelectronics Programming Tools
6.1.9.1 Object files
The result of the assembly of the source text is its translation into machine language. This is
a binary file that contains the binary values of the instructions, addresses and constant data.
This file is called the object file, and is named by default with the same name as the source
text, but with the extension
.OBJ.
This file is not legible, and is not intended to be read by humans.
When we say the object file contains machine language in binary form, we must distinguish
two cases:
The program has been written in only one file and all its addresses are defined in the source
text. In this case, the contents of the object file are sufficient to generate the EPROM
programming file. This case is possible, but is not the most frequent.
The program has been spread over several source files. In this case, the object file cannot
contain the absolute references for the objects that are declared
EXTERNAL in the source
text. Instead, the object file contains tables that give the names of the unresolved references
and the locations in the file where these references are used. This information will be used
by the linker to merge the object file together and correct the references using the values
supplied by those object files where the corresponding symbols are defined.
6.1.9.2 Listing files
The object file is always produced when the assembler is invoked. In contrast, the listing file is
only produced if the assembler is invoked with the
-LI option in the command line.
Unlike the object file, the listing file is intended to be read by humans. For this purpose, it is
presented in the form of a tabulated text. Here is an extract from a typical listing file:
81 segment at 90 'DATA'
82 0090 CounterLo: DS.B
83 0091 CounterHi: DS.B
84
85 0092 NbOfApples: DS 1
86 0093 NbOfPears: DS 1
87 0094 NbOfFruit: DS 1
88
89 code segment 'ROM'
90
91 0000 R C60000 ld A, d1
92 0003 R C70000 ld d2, A
93
94 MyCode
94 0006 3C90 inc CounterLo
94 0008 B691 ld A, CounterHi
94 000A A900 adc A, #0

Table of Contents

Related product manuals