1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74
| ;---------------------------------;
; Initialisation 8254 : It 10 ms ;
;---------------------------------;
;
; Initialisation des timers
; Appel De La Procedure En C :
; void Init8254s ();
;
PUBLIC _Init8254s
_Init8254s proc near
mov dx,TMR_CWR
mov al,36h
out dx,al
mov cx,10
loop $
mov dx,TMR_CNT0 ; timer 0 = pulse 1 microsec.
mov al,08
out dx,al
mov cx,10
loop $
mov al,00
out dx,al
;
mov cx,10
loop $
mov dx,TMR_CWR
mov al,74h
out dx,al
mov cx,10
loop $
mov dx,TMR_CNT1 ; timer 1 = pulse 10 millisec.
mov al,10h
out dx,al
mov cx,10
loop $
mov al,27h
out dx,al
;
mov cx,10
loop $
mov dx,TMR_CWR
mov al,0B7h
out dx,al
mov cx,10
loop $
mov dx,TMR_CNT2 ; timer 2 = pulse 10 millisec.
mov al,10h
out dx,al
mov cx,10
loop $
mov al,27h
out dx,al
ret
_Init8254s endp |
Partager