Laborator 3 - Probleme propuse

Scrieți un program în limbaj de asamblare care să rezolve expresia aritmetică, considerând domeniile de definiție ale variabilelor (in interpretarea cu semn si in interpretarea fara semn).

Adunări, scăderi

a - byte, b - word, c - double word, d - qword

  1. c-(a+d)+(b+d)
  2. (b+b)+(c-a)+d
  3. (c+d)-(a+d)+b
  4. (a-b)+(c-b-d)+d
  5. (c-a-d)+(c-b)-a
  6. (a+b)-(a+d)+(c-a)
  7. c-(d+d+d)+(a-b)
  8. (a+b-d)+(a-b-d)
  9. (d+d-b)+(c-a)+d
  10. (a+d+d)-c+(b+b)

a - byte, b - word, c - double word, d - qword

  1. (c+b+a)-(d+d)
  2. (c+b)-a-(d+d)
  3. (b+b+d)-(c+a)
  4. (b+b)-c-(a+d)
  5. (c+b+b)-(c+a+d)
  6. c-(d+a)+(b+c)
  7. (c+c+c)-b+(d-a)
  8. (b+c+d)-(a+a)
  9. a-d+b+b+c
  10. b+c+d+a-(d+c)

Înmulțiri, împărțiri

  1. c+(a*a-b+7)/(2+a)
    a-byte; b-doubleword; c-qword
  2. 2/(a+b*c-9)+e-d
    a,b,c-byte; d-doubleword; e-qword
  3. (8-a*b*100+c)/d+x
    a,b,d-byte; c-doubleword; x-qword
  4. (a*2+b/2+e)/(c-d)+x/a
    a-word; b,c,d-byte; e-doubleword; x-qword
  5. (a+b/c-1)/(b+2)-x
    a-doubleword; b-byte; c-word; x-qword
  6. x+a/b+c*d-b/c+e
    a,b,d-byte; c-word; e-doubleword; x-qword
  7. (a-2)/(b+c)+a*c+e-x
    a,b-byte; c-word; e-doubleword; x-qword
  8. 1/a+200*b-c/(d+1)+x/a-e
    a,b-word; c,d-byte; e-doubleword; x-qword
  9. (a-b+c*128)/(a+b)+e-x
    a,b-byte; c-word; e-doubleword; x-qword
  10. d-(7-a*b+c)/a-6+x/2
    a,c-byte; b-word; d-doubleword; x-qword
  11. (a+b)/(2-b*b+b/c)-x
    a-doubleword; b,c-byte; x-qword
  12. (a*b+2)/(a+7-c)+d+x
    a,c-byte; b-word; d-doubleword; x-qword
  13. x-(a+b+c*d)/(9-a)
    a,c,d-byte; b-doubleword; x-qword
  14. x+(2-a*b)/(a*3)-a+c
    a-byte; b-word; c-doubleword; x-qword
  15. x-(a*b*25+c*3)/(a+b)+e
    a,b,c-byte; e-doubleword
  16. x/2+100*(a+b)-3/(c+d)+e*e
    a,c-word; b,d-byte; e-doubleword; x-qword
  17. x-(a*a+b)/(a+c/a)
    a,c-byte; b-doubleword; x-qword
  18. (a+b*c+2/c)/(2+a)+e+x
    a,b-byte; c-word; e-doubleword; x-qword
  19. (a+a+b*c*100+x)/(a+10)+e*a
    a,b,c-byte; e-doubleword; x-qword
  20. x-b+8+(2*a-b)/(b*b)+e
    a-word; b-byte; e-doubleword; x-qword
  21. (a*a/b+b*b)/(2+b)+e-x
    a-byte; b-word; e-doubleword; x-qword
  22. a/2+b*b-a*b*c+e+x
    a,b,c-byte; e-doubleword; x-qword
  23. (a*b-2*c*d)/(c-e)+x/a
    a,b,c,d-byte; e-word; x-qword
  24. a-(7+x)/(b*b-c/d+2)
    a-doubleword; b,c,d-byte; x-qword
  25. (a*a+b+x)/(b+b)+c*c
    a-word; b-byte; c-doubleword; x-qword
  26. (a*a+b/c-1)/(b+c)+d-x
    a-word; b-byte; c-word; d-doubleword; x-qword
  27. (100+a+b*c)/(a-100)+e+x/a
    a,b-byte; c-word; e-doubleword; x-qword
  28. x-(a*100+b)/(b+c-1)
    a-word; b-byte; c-word; x-qword
  29. (a+b)/(c-2)-d+2-x
    a,b,c-byte; d-doubleword; x-qword
  30. a*b-(100-c)/(b*b)+e+x
    a-word; b,c-byte; e-doubleword; x-qword