48/317
3 - Programming a microcontroller
Then, once he masters both, he may start to write his source file. Obviously, if later he has to
do the same job with a different processor, the source file will be of no use in the future project.
3.1.2.2 Assembler
The word assembler has usually two meanings. Properly used, it is a program that translates
a text file, written according certain rules, into a binary file that contains a series of instructions
specific to a microprocessor or a microcontroller. However, the word Assembler is often im-
properly used instead of “assembly language”, for example in the sentence: “this program is
written in assembler”. This paragraph introduces the translating tool, or “assembler”.
The assembler is a program that runs on whatever computer is used by the programmer for
his regular job. It takes the source file, as explained above, as an input; then, after translation,
it outputs, depending on the user-specifed options, any of the following files:
The object file, containing binary data intended for further processing. It can not be read by
man.
The listing file, is a report containing both the original source code and its numeric
translation, presented in a tabulated manner. It can be read by man and used for reference
purposes.
In some cases, other files like, lists of variables and labels, or additional data. This varies
from one assembler to another.
If the assembler encounters an error in the syntax of the source file, or some ambiguity or lack
of information preventing it from completely processing the source file, it generates an error
report, this may be output in the listing, in a separate file, or directly on the computer console.
The error messages tell where the error is located, and, as much as possible, the cause of the
error, as in the following example:
TRIAL.ASM(6): ERROR: not a ST7 instruction or directive
Содержание 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 ...