Abstract
Programming in the native language of a processor requires knowledge of the function and rules of the assembler and associated development tools.
The principles of the assembly process, both for absolute and relocatable instances are covered here.
The rules and capabilities of the Microchip assembler are used for illustrative purposes and their relationship to the underlying machine code. The Microchip MPLAB IDE is used to show the role of the Integrated Development Environment in the code building process.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Notes
- 1.
Actually base-8 (octal) was the popular choice for several decades.
- 2.
The name is very old; it refers to the task of translating and assembling together the various modules making up a program.
- 3.
Of course you can make your own version with additional information.
- 4.
Plain include also works but is not recommended by Microchip.
- 5.
The replacement is dumb, for movf AUGEND_H,w,w would do the same job!
- 6.
Locating the multibyte code in memory in the Intel way, formatted low:high byte, is known as little-endian (working up from low to high address, the low byte end comes first) whereas the high-endian arrangement is favored by, amongst others, Motorola/Freescale.
- 7.
If the assembler announces that there are no errors then there is a tendency to think that the program will work. Unfortunately a lack of syntax errors in no way guarantees that the program will do anything of the sort!
- 8.
I have capitalized the first letter of all macro instructions to distinguish them from native instructions.
- 9.
Only a basic range is given here. Microchip’s MPASM ™ Assembler Users Guide with the MPLINK ™ Object Linker and MPLIB ™ gives a full list of linker directives.
- 10.
Obviously this is a ridiculously simple problem for teamwork, but it illustrates the principle in a manageable space.
- 11.
This is a hardware ‘pod’ that replaces the PIC MCU in the target circuit and allows the PC to take over the running of the system—see Fig. 16.6 on p. 582.
Author information
Authors and Affiliations
Corresponding author
Rights and permissions
Copyright information
© 2010 Springer-Verlag London Limited
About this chapter
Cite this chapter
Katzen, S. (2010). Assembly Language Code Building Tools. In: The Essential PIC18® Microcontroller. Computer Communications and Networks. Springer, London. https://doi.org/10.1007/978-1-84996-229-2_8
Download citation
DOI: https://doi.org/10.1007/978-1-84996-229-2_8
Publisher Name: Springer, London
Print ISBN: 978-1-84996-228-5
Online ISBN: 978-1-84996-229-2
eBook Packages: Computer ScienceComputer Science (R0)