The bottom line is that if an interrupt is used the code will eventually need to return back to the point where the interrupt occured UNLESS a "reset" command is issued somewhere along the way and the entire program is started over.
A sub can be called from the interrupt routine, but again that sub must return to the interrupt sub which then must return to the point where the interrupt occurred.
I certainly understand wanting to detect an event quickly (Interrupt?) and not being forced to return to the point in code where the event occurred.
But using an interrupt is not always necessary and may not always be the best method. ERCO never uses them and yet makes great robots and other stuff. So there are other ways to detect events and have the program flow to wherever you want. It all depends upon the application, what the event is, what the program needs to do after the event, and how fast it needs to do it. We have not been given this information by Mushroom.
@Mushroom... If you have not yet found and implemented an adequate solution, please let us know what the application is, what is triggering the interrupt, what the program needs to do, and how fast it needs to do it. Posting your existing (commented) code may also be helpful to those willing and able to help you.
If your problem has been solved, please let folks know.
Goey