8 bit arduinos: What happens to the data in registers during a function call? During an interupt?
The compiler is capable of analyzing which registers are used by the function or ISR, so it generates prologue and epilogue code that saves the registers on the stack on entry and restores them on exit.