Question: Problem 1 ( 1 0 points ) : Write an assembly program that evaluates the following expression using MOV, ADD / SUB instructions. Do not

Problem 1(10 points):
Write an assembly program that evaluates the following expression using MOV, ADD/SUB instructions. Do not change the original values in each variable. SUM =(varB - varC)+(varD - varE++), where varA, varB, etc., are variables, and ++ is the increment operator. Assign integer values to the variables. (Meaning, you may hardcode the inputs.) You do not need to print out the result. You may simply store the result in EBX and SUM. Debugging should reveal that the result is correctly stored in both EBX and SUM.
Problem 2(10 points):
Generate a disassembly file for the Problem 1program and write a brief description of the machine code bytes generated for each instruction. Also, include the corresponding memory addresses where each instruction is stored. You may have to infer some of the meanings of the byte values. Additionally, you can look into the x86 instruction set architecture to understand the byte codes better.

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 Programming Questions!