The following example shows how you might program the watchdog
timer in BASIC:
10
REM Watchdog timer example program
20
OUT &H443, data
watchdog
30
GOSUB 1000
40
OUT &H443, data
50
GOSUB 2000
60
OUT &H443, data
70
X=INP (&H443)
80
END
1000
REM
.
.
.
1070
RETURN
2000
REM
.
.
.
2090
RETURN
REM Your application task #1
REM Your application task #2
REM Disable the watchdog timer
Subroutine #1, your application task
Subroutine #2, your application task
REM Start and restart the
REM Reset the timer
REM Reset the timer
113
Appx. A