Detecting Power-On vs Reset

slurp

Senior Member
I crashed a computer a while ago and have started to reconstruct some code for a few robots, this code was written by Technical a few years back but has been very useful... While it appears back in Archive 21 I thought it was worth dropping in the code snippets...

Code:
peek $8E,b0
if bit1 = 0 then      ' power off/on
  bit1 = 1
  poke $8E,b0
' other code

else                  ' reset button pressed
' other code

endif
regards,
colin
 
Top