Thank you Gentlemen,

Thank you,

Reading the stack in the top of the Interrupt handler I learnt that it sometimes was above 150!

Yes, I use RESUME for returning from the interrupt handler. I was thinking this was a stack problem because when I switch the fuse for ignoring the stack overrun/underrun it does not reset (but still does not work properly) The problem accurs when the code jumps into the interrupt and I found where my stupidity was. I used gosubs which jump from the interrupt handler into ENABLED area. DISABLEing that portion of code fixed the problem. In fact the interrupt handler was calling itself again and again while in the external subroutine with enabled interrupts.

On this point of view if the stack is not rounded on these controllers I am not sure if I can use RESUME LABEL or not on tis particular controller - if I do not resume back into subroutine which was interrupted, I may have leakage of stack space again. Do you know how PICBASIC handles the RESUME LABEL? does it clear the stack from the previous broken calls?

Thank you,