Wasn't very hard but it required rigorous design. The important pieces were state machines that were committed to a log based storage at significant points in operation.
Then there is detection and handling of repeating crashes which is where it really gets interesting.
> The software rebooted and reinitialized the computer, and then restarted selected programs at a point in their execution flow near where they had been when the restart occurred.
See  for more details.
The difference in my case was that I did not have simple non-volatile memory like AGC had, I had flash chip with no wear leveling. To protect the flash from premature death I had to design my own database to store data in form of deltas appended to the file. When it started it would scan from the beginning of the file until last complete record and start from there. When the data in the file reached preset size all live records would simply be rewritten to beginnig of another file.