Question: PLEASE ANSWER CORRECTLY. THANK YOU. Section 2: Programming Objectives To learn the evaluation of the arithmetic expression with variables. . To learn the use of

 PLEASE ANSWER CORRECTLY. THANK YOU. Section 2: Programming Objectives To learn

PLEASE ANSWER CORRECTLY. THANK YOU.

Section 2: Programming Objectives To learn the evaluation of the arithmetic expression with variables. . To learn the use of direct-offset addressing. Problems (20 points) Write a program that implements the following arithmetic expression: EAX = -val2 + 7 - val3 + vall Use the following data definitions: vall SDWORD 8 val2 SDWORD -15 val3 SDWORD 20 In comments next to each instruction, write the hexadecimal value of EAX. Insert a call DumpRegs statement at the end of the program. (10 Points) Insert the following variables in your program: .data Uarray WORD 1000h.2000h 3000h,4000h Sarray SWORD -1,-2,-3,-4 Write instructions that use direct-offset addressing to move the four values in Uarray to the EAX, EBX, ECX, and EDX registers. When you follow this with a call DumpRegs statement, the following register values should display: EAX=00001000 EBX=00002000 ECX=00003000 EDX=00004000 Next, write instructions that use direct-offset addressing to move the four values in Sarray to the EAX, EBX, ECX, and EDX registers. When you follow this with a call DumpRegs statement, the following register values should display: EAX=FFFFFFFF EBX=FFFFFFFE ECX=FFFFFFFD EDX=FFFFFFFC (10 Points) Section 2: Programming Objectives To learn the evaluation of the arithmetic expression with variables. . To learn the use of direct-offset addressing. Problems (20 points) Write a program that implements the following arithmetic expression: EAX = -val2 + 7 - val3 + vall Use the following data definitions: vall SDWORD 8 val2 SDWORD -15 val3 SDWORD 20 In comments next to each instruction, write the hexadecimal value of EAX. Insert a call DumpRegs statement at the end of the program. (10 Points) Insert the following variables in your program: .data Uarray WORD 1000h.2000h 3000h,4000h Sarray SWORD -1,-2,-3,-4 Write instructions that use direct-offset addressing to move the four values in Uarray to the EAX, EBX, ECX, and EDX registers. When you follow this with a call DumpRegs statement, the following register values should display: EAX=00001000 EBX=00002000 ECX=00003000 EDX=00004000 Next, write instructions that use direct-offset addressing to move the four values in Sarray to the EAX, EBX, ECX, and EDX registers. When you follow this with a call DumpRegs statement, the following register values should display: EAX=FFFFFFFF EBX=FFFFFFFE ECX=FFFFFFFD EDX=FFFFFFFC (10 Points)

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!