Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

Step: 1

blur-text-image

Get Instant Access with AI-Powered Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Students also viewed these Databases questions