FabIATech Corporation58Watchdog Timer EnabledTo Enabled the watchdog timer, you have to output a byte of timer factor to thewatchdog register whose address is 2Eh and data port is 2fH. The following is anAssemble program, which demonstrates how to Enabled the watchdog timer and setthe time-out period at 28 seconds.;------------------------------------------------------------------------------------------; Enter the extended function mode, interruptible double-write;------------------------------------------------------------------------------------------Mov dx, 2eh ; Enter to extended function modeMov al, 87hOut dx,alOut dx,alMov al,07hOut dx,al;------------------------------------------------------------------------------------------------------; Logical device 8, configuration register CRF5 Bit 3,CRF6 Bit 0~7;------------------------------------------------------------------------------------------------------Mov dx,2fhMov al,08h ; Select Logical Device 8 of watchdog timerOut dx,alMov dX,2ehMov al,0f5h ;Set second as counting unitOut dx,alMov dx,2fhIn al,dxOr al,c0 ; Trigger P/W LED.And al,not c8h ;Set Second.;And al,c8h ;Set Minute.Out dx,alMov dx,2ehMov al,0f6hOut dx,alMov dx,2fhMov al,28h ; Set timeout interval as 28seconds and start countingOut dx,al;------------------------------------------; Exit extended function mode;------------------------------------------Mov dx,2ehMov al,0aahOut dx,alWatchdog Timer TriggerAfter you enable the watchdog timer, your program must write the same factor asenabling to the watchdog register at least once every time-out period to its previoussetting. You can change the time-out period by writing another timer factor to thewatchdog register at any time, and you must trigger the watchdog before the newtime-out period in next trigger.