Specifications

http://www.mikroelektronika.co.yu/english/product/books/PICbook/4_Poglavlje.htm
Files created as a result of program translation
Macros
Introduction
The ability to communicate is of great importance in any field. However, it is only possible if both
communication partners know the same language, i.e follow the same rules during
communication. Using these principles as a starting point, we can also define communication that
occurs between microcontrollers and man . Language that microcontroller and man use to
communicate is called "assembly language". The title itself has no deeper meaning, and is
analogue to names of other languages , ex. English or French. More precisely, "assembly
language" is just a passing solution. Programs written in assembly language must be translated
into a "language of zeros and ones" in order for a microcontroller to understand it. "Assembly
language" and "assembler" are two different notions. The first represents a set of rules used in
writing a program for a microcontroller, and the other is a program on the personal computer
which translates assembly language into a language of zeros and ones. A program that is
translated into "zeros" and "ones" is also called "machine language".
The process of communication between a man and a microcontoller
Physically, "Program" represents a file on the computer disc (or in the memory if it is read in a
microcontroller), and is written according to the rules of assembler or some other language for
microcontroller programming. Man can understand assembler language as it consists of alphabet
signs and words. When writing a program, certain rules must be followed in order to reach a
desired effect. A Translator interprets each instruction written in assembly language as a series
of zeros and ones which have a meaning for the internal logic of the microcontroller.
Lets take for instance the instruction "RETURN" that a microcontroller uses to return from a sub-
program.
When the assembler translates it, we get a 14-bit series of zeros and ones which the
microcontroller knows how to interpret.
Example: RETURN 00 0000 0000 1000
Similar to the above instance, each assembler instruction is interpreted as corresponding to a
series of zeros and ones.
The place where this translation of assembly language is found, is called an "execution" file. We
will often meet the name "HEX" file. This name comes from a hexadecimal representation of that
file, as well as from the suffix "hex" in the title, ex. "test.hex". Once it is generated, the execution
file is read in a microcontroller through a programmer.
An Assembly Language program is written in a program for text processing (editor) and is
http://www.mikroelektronika.co.yu/english/product/books/PICbook/4_Poglavlje.htm (2 of 15) [4/2/2003 16:18:10]