Your example is NOT correct.

When you jump to a Interrupt Service Routine with the ON INTERRUPT statement like so...

ON INTERRUPT GOTO ISR

you must treat this routine as if it was a subroutine, EXCEPT that with a subroutine it is exited with a RETURN, an Interrupt Service Routine MUST be exited with a RESUME.

Optionally, the RESUME can have a label to jump to as in...

RESUME ContinueFromHere

or in your example you would have...

RESUME Main

but if the label is omitted, then you will resume from the point the program was 'interrupted'.

So, if you specifically need to resume from a specific point, you do so by adding a label to the end of the RESUME statement as per my example above.

If you fail to use a RESUME when exiting your ISR, then eventually you will have a stack overflow with unpredicatable results. Remember, with most PICs, your stack is only four levels deep... that means a TOTAL of FOUR subroutines and/or interrupts at any one point in time.

Melanie