28
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
;
Содержание ROCKY - 058HV
Страница 2: ......