Patrik Bjorklund

Minimize Interrupt routines

Discussion created by Patrik Bjorklund on Jun 15, 2009
Latest reply on Jun 16, 2009 by CrasyCat



I am using a MC9S08QD4 and CodeWarrior.


I want to minimize the Interrupt routines that I have to absolute minimum.

In this case it means removing the "PSHH" and "PULH" instructions which is done at the beginning and end, respectivly.


I would like to keep all the code in C.

I saw in the compiler manual that you can use the #pragma TRAP_PROC" keyword for the interrupt routines and that will remove the pushing and popping of the H-reg.

Unfortunatley that does not remove the instructions :smileysad:


So, can anyone help me with this.. or should I write the routines in assembly instead?


Thanks in advance!