Old C18 Code

//**********************************************
//********** HIGH PRIORITY INTERRUPTS **********
//**********************************************
#pragma code highVector=0x08
void athighvector (void)
{
	_asm 	GOTO	interruptisrh	_endasm
}
#pragma code

//*********************************************
//********** LOW PRIORITY INTERRUPTS **********
//*********************************************
#pragma code lowVector=0x18
void atlowvector (void)
{
	_asm	goto	interruptisrl	_endasm
}
#pragma code // give back code control
New XC8 Code

Dont' bother with the seperate functions to cause the jump as the specified program memory locations, just define your interrupt functions directly as follows and the compiler will take care of it.


//**********************************************
//********** HIGH PRIORITY INTERRUPTS **********
//**********************************************
void interrupt interruptisrh (void)
{
	
}	


//*********************************************
//********** LOW PRIORITY INTERRUPTS **********
//*********************************************
void interrupt low_priority interruptisrl (void)
{
	
}

(Remember to update the function definitions in your header fine to match).

UK Electronic Designer
USEFUL?
We benefit hugely from resources on the web so we decided we should try and give back some of our knowledge and resources to the community by opening up many of our company’s internal notes and libraries through mini sites like this. We hope you find the site helpful.
Please feel free to comment if you can add help to this page or point out issues and solutions you have found, but please note that we do not provide support on this site. If you need help with a problem please use one of the many online forums.