Using Kip irvine32 X86 assembly language using Visual Studios. Please use CORRECT SYNTAX and actually run on Visual Studio as asm file before posting. I keep getting answers that simply solve the problem without writing an actual program that runs on visual studio.
Write a program that evaluates the following arithmetic expression: ((A+B)/C) * ((D-A)+E) Assign test values to the variables and display the resulting value.
main:
push rbp
mov rbp, rsp
mov DWORD PTR [rbp-4], 5
mov DWORD PTR [rbp-8], 6
mov DWORD PTR [rbp-12], 7
mov DWORD PTR [rbp-16], 8
mov DWORD PTR [rbp-20], 9
mov edx, DWORD PTR [rbp-4]
mov eax, DWORD PTR [rbp-8]
add eax, edx
cdq
idiv DWORD PTR [rbp-12]
mov ecx, eax
mov eax, DWORD PTR [rbp-16]
sub eax, DWORD PTR [rbp-4]
mov edx, eax
mov eax, DWORD PTR [rbp-20]
add eax, edx
imul eax, ecx
pop rbp
ret
Get Answers For Free
Most questions answered within 1 hours.