that probably isn't because of my code, because the code I provided you, if unmodified, cannot make your calc crash by itself. You need to have some bad instruction somewhere else.
Can you post code?
A suggestion for you is to open your program with TI-Flash Debugger (that comes with TI-Connect) and breakpoint/tracelog where it crashes.