User’s Manual
WIN Enterprises, Inc.
Feb., 2010
58
ASSEMBLY LANGUAGE
DOS DEBUG
Program 1: Initializing the watchdog controller
MOV DX,2EH
MOV AL,87H
OUT DX,AL
OUT DX,AL
O 2E 87
O 2E 87
MOV DX,2EH
MOV AL,07H
OUT DX,AL
MOV DX,2FH
MOV AL,08H
OUT DX,AL
MOV DX,2EH
MOV AL,30H
OUT DX,AL
MOV DX,2FH
MOV AL,01H
OUT DX,AL
O 2E 07
O 2F 08
O 2E 30
O 2F 01
Program 2:
Writing a watchdog timer interval value
MOV DX,2EH ;Set timer interval value to xx seconds
MOV AL,F6H
OUT DX,AL
MOV DX,2FH
MOV AL,XXH ; Timer interval
*** see note ***
OUT DX,AL
MOV DX,2EH
MOV AL,AAH
OUT DX,AL
O 2E F6
O 2F XX
O 2E AA