![IEI Technology WAFER-4821 Скачать руководство пользователя страница 34](http://html1.mh-extra.com/html/iei-technology/wafer-4821/wafer-4821_user-manual_4123066034.webp)
34
A tolerance of at least 5% must be maintained to avoid unknown routines within
the operating system (DOS), such as disk I/O that can be very time consuming.
Therefore if the time out period has been set to 10 seconds, the I/O port 443H must
be read within 7 seconds.
Note: when exiting a program it is necessary to disable the Watch-Dog Timer,
otherwise the system will reset.
Example program:
TIMER_PORT = 443H
TIMER_START = 443H
TIMER_STOP = 843H
;
; INITIAL TIME PERIOD COUNTER
;
MOV DX, TIME_PORT
OUT AL, 8 ; 8 SECONDS
;
; ADD YOUR APPLICATION HERE
;
MOV DX, TIMER_START
IN AL, DX. ; START COUNTER
;
; ADD YOUR APPLICATION HERE
;
W_LOOP:
MOV DX,TIMER_STOP
IN AL,DX
MOV DX, TIMER_START
IN AL, DX. ; RESTART COUNTER
;
; ADD YOUR APPLICATION HERE
;
CMP EXIT_AP, 0
JNE W_LOOP
MOV DX, TIMER_STOP
IN AL, DX
;
; EXIT AP
;