In order to define a function in a specific segment, use the CODE_SEG pragma.
/* This function is defined in segment `int_Function'*/ #pragma CODE_SEG Int_Function #pragma TRAP_PROC void INCcount(void) { tcount++; } #pragma CODE_SEG DEFAULT /* Back to default code segment.*/