程序代写代做代考 mips computer architecture assembly Introduction to Computer Architecture Control and Loops

Introduction to Computer Architecture Control and Loops

For this project, you will write a MIPS assembly language program to calculate the summation of

a series of numbers. You will take three parameters as input: A starting index, the number of integers in

the series, and the distance between two numbers in the series. Your program should check that the user

has entered reasonable data before attempting to process the request. After computing the summation,

it should display the series and the summation. After each set of input, you should ask the user if they

wish to continue.

Your program should include appropriate comments indicating what the code should be doing and

what registers are being used for. After displaying the results, your program should exit cleanly. Your

programs should be turned in through HuskyCT before class starts on the due date. You should test your

programs using the SPIM simulator to ensure their functionality before submitting them.

Example output:

Enter the first integer in the series: 5
Enter the number of integers in the series: 3
Enter the offset between integers in the series: 4

The series is: 5, 9, 13.
The summation of the series is 27.

Would you like to calculate another summation (Y/N)? y

Enter the first integer in the series: 4
Enter the number of integers in the series: 5
Enter the offset between integers in the series: 27

The series is 4, 31, 58, 85, 112.
The summation of the series is 290.

Would you like to calculate another summation (Y/N)? Y

Enter the first integer in the series: -16
Enter the number of integers in the series: -22
There must be a positive number of integers in the series.

Would you like to calculate another summation (Y/N)? n

Objectives:

1. To practice writing MIPS assembly language programs.

2. To introduce and practice working with conditional statements.

3. To introduce and practice building loop structures.

Leave a Reply

Your email address will not be published. Required fields are marked *