I'm not quite sure about using the ISR function declaration to set the interrupt vector number. I'd rather see:
#pragma CODE_SEG __NEAR_SEG NON_BANKED
interrupt void tim_ch0_vector(void) {
PORTA = 0x55;
TFLG2 = 0x80;
}
#pragma CODE_SEG DEFAULT
You're also not adding the final ingredient to the mix, which is to plug the interrupt's address into the interrupt vector table. If you're using the CW stationery, this table is located in the file vector.c. In that file, do the following:
1) Declare your ISR
extern void near tim_ch0_vector(void); // Declare code of ISR to be somewhere else
2) Add address to vector table in vector.c
const tIsrFunc_vec[] @0xFF80 = {
UnimplementedISR, // vector 63
UnimplementedISR, // vector 62
...
UnimplementedISR, // vector 9
tim_ch0_vector(), // vector 8 // Where the processor is to go for this int
UnimplementedISR, // vector 7
...
Good luck!
---Tom