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
Содержание ST7 Series
Страница 1: ...ST7 8 BIT MCU FAMILY USER GUIDE JANUARY 1999 1 ...
Страница 238: ...238 317 8 C Language and the C Compiler 08 Burn bmp Then use the EPROMer programmer software as described in Chapter 7 ...
Страница 289: ...289 317 10 Second Application a Sailing Computer 10 befor Bs Rw Vw VMG AlphaR AlphaV Before the wind ...