(Unintentionally partially duplicate post - so I edited to cover seperate concept(s) in separate posts)
Conceptually it is possible to write something to the RAM and have it surviving a button 3 long press. I don't know the (RAM) memory map in detail, but altering where the stack begins could be an option (I'm leaning out of the window here by a lot...).
Espruino is a JavaScript interpreter for low-power Microcontrollers. This site is both a support community for Espruino and a place to share what you are working on.
(Unintentionally partially duplicate post - so I edited to cover seperate concept(s) in separate posts)
Conceptually it is possible to write something to the RAM and have it surviving a button 3 long press. I don't know the (RAM) memory map in detail, but altering where the stack begins could be an option (I'm leaning out of the window here by a lot...).