







Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!








.model flat, stdcall option casemap:none include \masm32\include\masm32rt.inc .data n DWORD? m DWORD? .code start: print"entrer les deux valeurs :",13, invoke STDLN ADDR n, invoke STDLN ADDR m, mov n,val(ADDR n) mov m,val(ADDR m) mov eax,n MUL eax,m CMP eax, JG ProPos print"le produit est negatif",13, JMP FIN ProPos: print"le produit est positif",13,
end start exercice 4: . .model flat, stdcall option casemap:none include \masm32\include\masm32rt.inc .data n DWORD? .code start: print"entrer une valeur ",13, invoke STDLN ADDRn, mov eax,n CMP eax, JL NEGATIF JE NULL JMP POSITIF NEGATIF: print"ce nombre est negatif",13, JMP FIN NULLE: print"ce nombre est null",13, JMP FIN POSITIF: print"ce nombre est postif",13,
print"la solution est impossible.",13, JMP FIN solution1: print"la solution est x=",13, mul ebx,(-1) div ebx,eax print STR$(ebx),13, FIN: end start
.model flat, stdcall option casemap:none include \masm32\include\masm32rt.inc .data a DWORD? b DWORD? c DWORD? Delta DWORD? x1 DWORD? x2 DWORD? .code start: print"entrer les valeurs de a ,b et c svp:",13, invoke STDLN ADDR a, 32
invoke STDLN,ADDR b, invoke STDLN,ADDR c, mov a,val(ADDR a) mov b,val(ADDR b) mov c,val(ADDR c) mov eax,a mov ebx,b mov ecx,c CMP a, JNE DELTA_SOLUTION CMP b, JNE CB_SOLUTION CMP c, JNE C_SOLUTION print"infinite de solutions",13, JMP FIN C_SOLUTION: print"la solution est impossible",13, JMP FIN CB_SOLUTION: print"la solution est:X=",13, mov edx,ecx mul edx,(-1) div edx,ebx print str$(edx),13, JMP FIN
mov x2,ebx MUL x2,(-1) ADD x2,Delta DIV x2,eax print"les solutions de cette equation sont:",13, print str$(x1),13, print"et ",13, print str$(x2),13, JMP FIN ONE_SOLUTION: mov egx,ebx MUL egx,(-1) DIV egx,eax print"la seul solution est:",13, print str$(egx),13, JMP FIN NO_SOLUTION: print"la solution est impossible dans IR",13, FIN: end start Devoire 2 : exercice1:
print"Le factorielle est:",13, print Str$(F),13, end Start exercice3:
exercice4: