Overview of Assembler
MPASM assembler can be used in two ways:
To generate absolute code that can be executed directly by a microcontroller.
To generate object code that can be linked with other separately assembled or compiled modules.
Generating Absolute Code
Absolute code is the default output from MPASM assembler. This process is shown below.
When a source file is assembled in this manner, all values used in the source file must be defined within that source file, or in files that have been explicitly included. If assembly proceeds without errors, a HEX file will be generated, containing the executable machine code for the target device. This file can then be used in conjunction with a device programmer to program the microcontroller.
Generating Object Code
MPASM assembler also has the ability to generate an object module that can be linked with other modules using Microchip's MPLINK linker to form the final executable code. This method is very useful for creating reusable modules that do not have to be retested each time they are used.
Related modules can also be grouped and stored together in a library using Microchip's MPLIB librarian. Required libraries can be specified at link time, and only the routines that are needed will be included in the final executable.
Refer to Relocatable Objects for more information on the differences between absolute and object assembly.
Microchip Technology Inc. Microchip's Web Site Voice: (480) 792-7200 Fax: (480) 899-9210 Microchip's E-mail Address |