Question: I need help doing this assembly program. The directions Modify your assembly program so that it calculates the following expression using associated registers. A =

I need help doing this assembly program. The directions

Modify your assembly program so that it calculates the following expression using associated registers. A = (A + B) (C + D)

You will use EAX for A, EBX for B, etc. Initialize these values with symbolic constants in hexadecimal. Make A = 29, B = 48, C = 92, and D = 22.

To do this, you need to move the integer values into the associated registers, and then use the ADD and SUB instructions (and please follow the order of operations).

Now another one:

A =C-(A + (C23) + B) + (B + 23)

It does not say what the associated registers should be in the project.

My code which I do not think is correct.

INCLUDE Irvine32.inc

.data

A_value DWORD 29h

B_value DWORD 48h

C_value DWORD 92h

D_value DWORD 22h

.code

main proc

mov eax, A_value

mov ebx, B_value

mov ecx, C_value

add edx, D_value

add eax, ebx

sub eax, edx

mov A_value, eax

invoke ExitProcess, 0

main endp

end main

invoke ExitProcess, 0

main endp

end main

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!