Bonsoir , je veux faire un programme qui Clignoter des LED paires si on appui sur sw0 et les LED impaires si on appuie sur sw1, il y a des choses dans la correction qu j'ai pas compris:
Code : Sélectionner tout - Visualiser dans une fenêtre à part
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
 
Code SEGMENT
Assume CS :code , DS :donnee
Prog Proc
MOV AX,donnee          ; pointer le data segment
MOV DS,AX
MOV AL,Mot_com        ; configurer  les ports en sorties
OUT  Reg_com,AL
DEBUT: IN AL,PortC
AND AL,03H
CMP AL,01
JZ Diode_paire          ; si SW=1 alors battement paire
CMP AL,02
JZ Diode_impaire       ; si SW=1 alors battement impaire
JMP DEBUT
Diode_paire : MOV AL,05H          ; Battement des diodes paire
OUT PortA,AL
CALL Tempo                ; Temporisation
MOV AL,00H
OUT PortA,AL
CALL Tempo         ; Temporisation
JMP DEBUT
Diode_impaire : MOV AL,0AH         ; Battement des diodes impaire
OUT PortA,AL
CALL Tempo             ; Temporisation
MOV AL,00H
OUT PortA,AL
CALL Tempo                ; Temporisation
JMP DEBUT 
MOV AX,4C00H 
INT 21H
Prog endp
Tempo : MOV CX,7FFFH         ; Effectuer une temporisation
Temp1: PUSh CX           ; avec deux boucles imbriqués
MOV CX,7FFFH
Temp2: NOP 
NOP 
NOP 
NOP
LOOP Temp2
POP CX 
LOOP Temp1
RET 
Code ends 
End prog
j'ai pas compris pourquoi il fait:
1) AND Al,03h ; pourquoi ???
2) mov al,05h; j'ai pas ccompris
3)mov al,0Ah; pourquoi??