Well you could use setjmp(), but that's a problem waiting to happen and you would have to learn how to unroll the stack. Best left for another day I think.
The better way is to structure your code so flags can work.
Can you explain why it's imperative that the interrupted code does not execute a single extra instruction after the interrupt?
Rob