Question: Design: The objective of this assignment is to create a program that will read a value from an array, add another value to this, and

Design: The objective of this assignment is to create a program that will read a value from an array, add another value to this, and save the sum of those two values into a specific register. (20 points) Create a BYTE array with the label input. input should have eight elements. You should place values 1,2,3,4,5,6,7,8 in each of the elements of this array. (20 points) Create a BYTE variable with the label shift. shift should hold a single value 2. (20 points) Set the values of the EAX, EBX, ECX, and EDX to 0. You then sum the value of this variable with each of the individual values in the array input. The program should read each of the values from the array input one at a time and add the value shift to it. The sum should be stored in the correct register: (5 points) The first sums should be in high position of the AX register. (5 points) The second sums should be in low position of the AX register. (5 points) The third sums should be in high position of BX register. (5 points) The fourth sums should be in low position of BX register. (5 points) The fifth sums should be in high position of CX register. (5 points) The sixth sums should be in low position of CX register. (5 points) The seventh sums should be in high position of the DX register. (5 points) The eighth sums should be in low position of the DX register.Design: The objective of this assignment is to create a program that

; Project 2 ( Other solutions could work as well ) .386 .model flat,stdcall .stack 4096 ExitProcess proto,dwExitCode:dword ;Setup the input array and the shift variable .data input byte 1,2,3,4,5,6,7,8 shift byte 2 .code main proc ; clear up the registers to make sure there is no old values inside them . ; Setup EAX register with first and second values from the input array .. ; Setup EBX register with 3rd and 4th values from the input array . ; Setup ECX register with 5th and 6th values from the input array ; Setup EDX register with 7th and 8th values from the input array .. ; exit the program invoke ExitProcess, 0 main endp end main

; Project 2 (Other solutions could work as well ) .386 .model flat,stdcall .stack 4096 ExitProcess proto, dwExitCode: dword ;Setup the input array and the shift variable .data input byte 1,2,3,4,5,6,7,8 shift byte 2 .code main proc ; clear up the registers to make sure there is no old values inside them ; Setup EAX register with first and second values from the input array ; Setup EBX register with 3rd and 4th values from the input array ; Setup Ecx register with 5th and 6th values from the input array ; Setup EDX register with 7th and 8th values from the input array ; exit the program invoke ExitProcess, O main endp end main ; Project 2 (Other solutions could work as well ) .386 .model flat,stdcall .stack 4096 ExitProcess proto, dwExitCode: dword ;Setup the input array and the shift variable .data input byte 1,2,3,4,5,6,7,8 shift byte 2 .code main proc ; clear up the registers to make sure there is no old values inside them ; Setup EAX register with first and second values from the input array ; Setup EBX register with 3rd and 4th values from the input array ; Setup Ecx register with 5th and 6th values from the input array ; Setup EDX register with 7th and 8th values from the input array ; exit the program invoke ExitProcess, O 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!