Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Write a complete ASSEMBLY program that: 1 . Prompt the user to enter 1 0 numbers. 2 . save those numbers in a 3 2

Write a complete ASSEMBLY program that:
1. Prompt the user to enter 10 numbers.
2. save those numbers in a 32-bit integer array.
3. Print the array with the same order it was entered.
3. Calculate the sum of the numbers and display it.
4. Calculate the mean of the array and display it.
5. Rotate the members in the array forward one position for
9 times. so the last rotation will display the array in reversed order.
6. Print the array after each rotation.
check the sample run.
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
Don't use any shift or rotate instructions which we have not covered
yet. You need to use loops and any kind of addressing.
All you work should be on the original array. Don't make
a copy of the array at any time.
Add comments to make your program easy to read.
check the rubric before you submit.
Sample Run:
Please enter a number: 2
Please enter a number: 3
Please enter a number: 4
Please enter a number: 5
Please enter a number: 6
Please enter a number: 7
Please enter a number: 8
Please enter a number: 9
Please enter a number: 0
Please enter a number: 10
The sum is: 54
The mean is: 54/10
The original array: 23456789010
After a rotation: 10234567890
After a rotation: 10023456789
After a rotation: 10092345678
After a rotation: 10098234567
After a rotation: 10098723456
After a rotation: 10098762345
After a rotation: 10098765234
After a rotation: 10098765423
After a rotation: 10098765432
Press any key to continue ...
ASSEMBLY CODE ;
pls make sure code runs correctly and also displays the output in this exact format, displaying all the rotation of numbers . USE IRVINE LIBRARY and follow the following rubric All lines are indented correctly
/1 pts
All lines are shorter than 80 columns
/1 pts
Comments at the top of the program: date / what your program does. Name of the student is not there.
/1 pts
The run is included as a comment at the end of your code
/2 pts
Declare and initialize the array. 1. right data size, 2. right number of elements 3. leaving it unitialized
/3 pts
comment before the sum and average calculation parts.
/1 pts
no immediate numbers inside the code segment. type, lengthof and sizeof operators are used instead.
/3 pts
The program is running with no syntax errors and run time errors.
/5 pts
prompting the user to enter 10 elements and saving it in memory.
/2 pts
using loops to carry out the requirements of the program.
/3 pts
using indexed or indirect addressing throughout the code.
/2 pts
calculating the sum and average and displaying them.
/3 pts
rotating the array as required and displaying it after each rotation.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Beyond Big Data Using Social MDM To Drive Deep Customer Insight

Authors: Martin Oberhofer, Eberhard Hechler

1st Edition

0133509796, 9780133509793

More Books

Students also viewed these Databases questions

Question

oceanview marine audit case assignment 5 solution please for 14-4

Answered: 1 week ago

Question

What were the reasons the collective agreement was achieved?

Answered: 1 week ago

Question

What does Copp say is the most important asset of any airline?

Answered: 1 week ago