2. The first loop: Ask the user to enter 19 numbers to fill the first 19 positions of the array.
3. The second loop: Add all 19 numbers and place the sum in the last position of the array.
4. The third loop: Reverse the first half of the array.
5. The fourth loop: Use a loop to display the array, to show that the first half was, indeed, reversed. Also, that you correctly summed the first 19 numbers. As with step 1, the loop has to access the array from the first element to the last and display the numbers stored in memory. Use a message that reads "The array after the first half was reversed is: "
This material may consist of step-by-step explanations on how to solve a problem or examples of proper writing, including the use of citations, references, bibliographies, and formatting. This material is made available for the sole purpose of studying and learning - misuse is strictly forbidden.;// .386
;// .model flat,stdcall
;// .stack 4096
.data ;// write your data in this section
prompt BYTE "Please enter 19 numbers" , 0dh, 0ah, 0 ;user prompt
msg BYTE "The array after the first half was reversed is:" , 0dh, 0ah, 0 ;final message
len DWORD 20 ;variable for length of array
array DWORD 20 DUP(?) ;makes space for 20 integers
.code ;// write your program here
mov edx, OFFSET prompt ;move prompt to edx
call writestring ;print the prompt
mov ecx, 19 ;set ecx to 19
mov edx, OFFSET array ;move array address to edx
call readdec ;read next element
mov [edx], eax ;store it to the array
add edx, 4 ;increment...