/*****************************************************

GENERATE_WDTOs.C

Z-World, 2001

This program generates watchdog timeouts that  
can be displayed with DISPLAY_ERRORLOG.C.
Run-time error logging requires battery backed
RAM to work correctly.

1) Make sure ENABLE_ERROR_LOGGING at the top of the
   RabbitBIOS.c is #defined to 1.

2) Compile this program to flash.

3) Disconnect the programming cable and power from the target

4) Wait a moment, then reconnect the power and programming cable.

5) Compile DISPLAY_ERRORLOG.C and run it to see the
   count of watchdog timeouts
******************************************************/
main(){
	;

#asm
	ipset 3          ; disable interrupts so that the
	                 ; periodic ISR doesn't hit the
	                 ; watchdog.

	ld a,0x53		  ; set the WD timeout period to 250 ms
	ioi ld (WDTCR),a
#endasm

   while(1);        // now loop. 
}