# 1. Create a DWORD integer array that is 20 elements long. 2. The f...

## Question

1. Create a DWORD integer array that is 20 elements long.
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: "

## Solution Preview

These solutions may offer step-by-step problem-solving explanations or good writing examples that include modern styles of formatting and construction of bibliographies out of text citations and references. Students may use these solutions for personal skill-building and practice. Unethical use is strictly forbidden.

;// .386
;// .model flat,stdcall
;// .stack 4096
ExitProcess proto,dwExitCode:dword

.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
main proc

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
L1:
mov [edx], eax ;store it to the array
add edx, 4 ;increment...

By purchasing this solution you'll be able to access the following files:
main.asm.

\$25.00
for this solution

PayPal, G Pay, ApplePay, Amazon Pay, and all major credit cards accepted.

### Find A Tutor

View available Assembly Language Programming Tutors

Get College Homework Help.

Are you sure you don't want to upload any files?

Fast tutor response requires as much info as possible.