Skip to main content
6 events
when toggle format what by license comment
May 25, 2018 at 13:50 history edited Juraj CC BY-SA 4.0
added 2 characters in body
May 25, 2018 at 13:45 history edited Juraj CC BY-SA 4.0
added 2 characters in body
May 25, 2018 at 13:43 comment added Edgar Bonet Then you should clarify your answer, say that you are proposing a different approach (the OP specifically asked to “stop the program [...] and start again”), adjust the wording accordingly (“must” → “should”), tell if/how the proposed approach is better, and maybe explain how resetting the “state of the program” (whatever you mean by that) is different from resetting the program itself.
May 25, 2018 at 12:53 comment added Juraj @EdgarBonet, I did read your answer and it is correct. I answer other point of view, not what he coded, but what he wants to achieve (second comment). He doesn't want to reset the program, only the 'state of the program'.
May 25, 2018 at 12:47 comment added Edgar Bonet Did you read my answer? __init() completely resets the state of the program. There is no “after the interrupt”: since __init() does not return, the following reti (return from interrupt) instruction will never be executed. And there is no “state where it was before interrupt”: that state was on the stack, and the stack is reset by __init().
May 25, 2018 at 12:05 history answered Juraj CC BY-SA 4.0