SimonZhu

How to create the dead loop by one assembly instruction ?

Discussion created by SimonZhu on Sep 13, 2007
Latest reply on Sep 24, 2007 by David Payne
I want to added a software trap in my application, I fill the unused ROM location with the SWI instruction. And I want to add the dead loop in the ISR of SWI, so that the watchdog can reset the CPU.
 
My 'deadloop' code is as below:
 
dead_loop:
                  NOP;
                  JMP dead_loop;
 
I remeber in the MCS-51 MCU, we could invoke a single insrutcion "SJMP &;" to create a deadloop, is there any similar instruction for the HC08?
 
Thanks,
Simon

Outcomes