4.3.7.2 What Do I Need Other Than Instructions in an Assembly Source File?
Assembly code typically needs assembler directives, as well as the instructions themselves. The operation of these directives is described in the following document. It is available for download from the Microchip Technology website, www.microchip.com.
“MPLAB® XC-DSC Assembler, Linker and Utilities User’s Guide” (DS-50003590)
There are two directives that are commonly used in assembly code. The
first one is the .section
directive. All assembly code must be placed in a
section using this directive, so that it can be manipulated as a whole by the linker, and
placed into memory. The second one is the .global
directive. This
directive is used to make symbols accessible across multiple source files.