16.2 Writing an Interrupt Service Routine

Following the guidelines in this section, you can write all of your application code, including your interrupt service routines, using only C language constructs.

All ISR code will be placed into a named section that starts with .isr. A function with a section attribute will prepend .isr to the name given. Code compiled with -ffunction-sections will also prepend .isr to the section name. For details, see section The -ffunction-sections Option.

If you have created your own linker script file and that file is older than an MPLAB C30 v3.30 project, you will need to modify your linker script as per the Readme_XC16.html file found in the docs subdirectory of the MPLAB XC16 install directory.