Barry, I defined a RESET instruction using a macro, assigning it a value of an illegal instruction, $32. On any reset, my code tests the reset register, and can tell if the reset was caused by this instruction (assuming there isn't another illegal instruction somewhere).
Here is the macro:
;
;
; This Macro defines an instruction to reset the CPU.
;
RESET: macro
dc.b $32 ; this is illegal operation code
endm
(darn, this board keeps blowing away my formatting. How do we who don't know HTML get code to format right?)
Message Edited by rocco on 02-16-200607:35 PM