mips汇编代写

Programming Assignment #2
Description: ​​Your task is to implement a selection sort algorithm in MIPS assembly language.

Your program must implement the following steps:

  • ●  Prompt the user for a number that defines the size of an array
  • ●  Prompt the user to enter ​n​ integers​ ​based on the size of the array
  • ●  Store all integer values in an array in memory
  • ●  Sort all integer values
  • ●  Print out the sorted integer list
  • ●  Your program must implement the ​selection sort algorithm​​. Do not implement bubble

    sort or any other sorting algorithm.

    To assist you in completing the assignment, review and trace the C implementation for selection sort algorithm. (source: Wikipedia)

    Example Program Execution:​​ Reads in 10 integers, stores them in memory, sorts the array in memory and displays the sorted array. Note, your program should work for any number of integers (not just 10).

Enter Array Size: 10
Enter Integer: 2
Enter Integer: 4
Enter Integer: 6
Enter Integer: 5
Enter Integer: 1
Enter Integer: 0
Enter Integer: 7
Enter Integer: 9
Enter Integer: 8
Enter Integer: 4
SortedArray: 0124456789

Don’t Forget:​​ Your program should provide a meaningful message that prompts the user for input such as “Enter Array Size” and “Enter Integer”
Submission Instructions:

  • ●  Name your file as ​NETID_​ hw2.asm. Replacing the text netid with your personal netid in the format ab123123
  • ●  Submit your .asm file on Blackboard. You can only submit once, so make sure you test it before you upload your file.
  • ●  Permissible Collaboration: ​​(1) Working together to understand the homework, (2) Helping a fellow student with a bug, (3) Working together to design a solution (for example: flowchart diagram and/or pseudo-code)
  • ●  Cheating / Academic Dishonesty: ​​(1) Sharing your code with another student, (2) Copying code segments from another student, (3) Having significantly similar code as another student.

○ Students that have portions of their code similar to online sites such as Chegg or StackOverflow will be reported for academic dishonesty!

Grading Rubric:

WARNING! ​​All student submissions will be scanned for similarity. You may help each other, but sharing code is considered cheating. Additional details are below. Ask questions, if you are confused.

Component

Points

Properly Submitted: ​​All the submission instructions were followed properly, including naming conventions.

10 points

Commenting & Programming Organization: ​​Code is well organized and properly commented. Your code should be easy to read and follow. It should not be overly complicated / convoluted.

10 points

Functionality (User Input): ​​User is given meaningful messages for entering input. The number of integers to enter is based on the array size entered by the user.

10 points

Functionality (Stored Integers in Memory): ​​Numbers are stored sequentially in memory (not in

10 points

separate registers)

Functionality (SWAP): ​​Displays at least some swapped numbers even if they are not properly sorted.

20 points

Functionality (Sorted): ​​Code successfully displays the sorted integers that were input from the user. Zero for this component if not properly sorted.

40 points

TOTAL

100 points

*Note: Your program must implement selection sort to receive credit. Do not implement any other sorting algorithm