Expression in assembly language

Implement the following c++ expression in assembly language, using 32-bit unsigned operand:
Val1 = (val2 * val3) / (val4 - 3)

Please, use this information:

.code

mov eax, val2

mov ebx, val3

mul ebx

mov ebx, val4

sub ebx, 3

div ebx

mov val1, eax

  1. Implement the following expression in assembly language, using 32-bit signed operands:

Val1 = (val2 / val3) * (val1 + val2)

Please, use this information:

.code

mov eax, val2

cdq

mov ebx, val3

idiv ebx

mov ebx, val1

add ebx, val2

imul ebx

mov val1, eax

Unlock Your Academic Potential with Our Expert Writers

Embark on a journey of academic success with Legit Writing. Trust us with your first paper and experience the difference of working with world-class writers. Spend less time on essays and more time achieving your goals.

Order Now