41
Example Assembly Program:
TIMER_PORT = 443H
TIMER_START = 443H
TIMER_STOP = 843H
;;INITIAL TIME PERIOD COUNTER
MOV DX, TIME_PORT
MOV AL,8: ;;8 SECONDS
OUT DX,AL
;;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