4.3.3.4 How Do I Stop the Compiler From Using Certain Memory Locations?

Concatenating an address attribute with the noload attribute can be used to block out sections of memory. For more on variable attributes and options, see the following sections in this user’s guide:

9.10 Variable Attributes

6.6.1 Options Specific to DSC Devices

Also, you can use the option -mreserve. See the “MPLAB® XC-DSC Assembler, Linker and Utilities User’s Guide” (DS-50003590) for details on linker scripts.