Question: ASSEMBLY LANGUAGE X86 MASM Create an integer array that is 12 elements long. Use the ReadInt procedure in a loop to fill the array with

ASSEMBLY LANGUAGE X86 MASM

Create an integer array that is 12 elements long. Use the ReadInt procedure in a loop to fill the array with numbers taken from the keyboard.

Print the array to the screen with a message like "Here is your array: ".

Use a loop to reverse the first half of the array in place. In place means in the same memory location occupied by the array. Do not copy the elements to any other array and do not create extra variables. It would be a waste of memory. For temporary data, use the CPU registers.

Use the SIZEOF, TYPE, and LENGTHOF operators to make the program as flexible as possible to support the array size and type being changed in the future. If I change the array size in your code to, say, 16, your program should still run correctly, rotating the array elements.

Once you have reversed the first half of the array use a loop to print out each element to prove that the array is correct. Also write a message, "Here is the array with the first half reversed: "

Output any appropriate messages to the display that you feel are needed to make the program clear to the user.

Your program output should look like this:

 Please enter 12 numbers: 1 2 3 4 5 6 7 8 9 10 11 12 Here is your array: +1 +2 +3 +4 +5 +6 +7 +8 +9 +10 +11 +12 Here is the array with the first half reversed: +6 +5 +4 +3 +2 +1 +7 +8 +9 +10 +11 +12 

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!