arduino pro mini reset button press detection

By default, pressing the reset button simply resets the board and runs the code over again. But what if I want something different to happen when the reset button is pressed? To keep things simple, say I have a variable
int save=0;
defined in the code
But when i press the reset button, instead of turning off and on the board to reset, I want save set to 1. When the board finish resetting, it will still remember that save=1 and do something else.

Is this possible to do with just an arduino pro mini?

Thanks for the help!

The reset button will always reset the processor, that's built into the hardware. However, what you want to do is to have a variable that persists through a reset. You can do that if you store it in the processor's EEPROM, see the playground for examples of how to write and read this area of memory.

There is i believe a reset interrupt, which is fired after the processor is reset. you could place your code in the handeler, or set the reset var in the handeler. how you access it in the arduino ide, i'm not sure!