Question: Create an assembly program that takes two arrays. To prove that the program works, ask the user to input 2 arrays, each of 8 elements.

Create an assembly program that takes two arrays. To prove that the program works, ask the user to input 2 arrays, each of 8 elements. Do not hard code the number eight. Use SIZEOF, LENGTHOF and other techniques to make your program adaptable to any array size. Calculate the sum of the two arrays, by adding element by element and deposit the result in the first array memory location. Calculate the difference of the two arrays, by subtracting the first array from the second, element by element, and deposit the result in the second array.

Print out both arrays in two columns, side by side, with a few spaces between them. Each array has to be in a different color other than the screen default which is lightGray. Choose any colors you wish. The columns have to have headers showing "sum" and "difference". Also, output a message to indicate that the following columns are the sum and difference. Make sure you do not leave the screen in a different color other than lightGray. When your program exits, the color has to return back to lightGray. Choose the colors carefully. For example, one cannot read numbers which are blue on black or black on black. If you want to use blue as an example, set the background to white or anything else that makes the numbers readable.

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!