I need to add an Interrupt Service Routine (ISR) to existing code in C for a PIC18F4620 and a PIC18F46K22. As you can see in section 9 (of both datasheets), these devices have multiple interrupt vectors:
0x0008 for high priority interrupts,
0x0018 for low priority interrupts.
I'd like to have an answer which is useful in many cases, so the question would be: how can I make a function on a specific program memory address? For the ISR, this address would be
If it's of any use, I'm using the MPLAB C18 compiler, v3.44.
Related: C coding design - function pointers?