Reference no: EM13165389
How do a bubble sort in MIPS?
The sort should be done "in place" (i.e., in the same array that it is stored in). The sorting routine must be implemented as a procedure with the following signature:
void sort(int n, int values[]);
Please follow the guidelines below carefully.
FILENAME
Your code must be implemented in a file called ec2.asm
INPUT
At the beginning of your MARS file you must use the directive:
.include "ec2_data.asm"
This will include the contents of the named file within your program. The file must be in the same directory as ec2.asm for it to work properly.
The file ec2_data.asm will put some values in the "data segment". The first value is the number of values to sort (n), the remaining n word values are the data to sort. Following the example below, the values will be stored in memory as word values starting at address0x10010000.
.data
.word 3
.word 40
.word 30
.word 70
.text
When grading this assignment, different data files will be used to ensure the sorting works correctly.
OUTPUT
After sorting the values in the data segment, your program must must loop through and output the listed values using the MIDI out synchronous syscall in MARS. The value is the "pitch" parameter to the syscall. The other parameters should be as follows:
Duration: 250 ms
Instrument: up to you (see the MARS help page for syscalls)
Volume: 64
Program to generate a star-based histogram for a quiz
: Write a C++ program to generate a star-based histogram for a quiz (maximum score possible is 5) given to a class of N students, where N is an input from the user. Use arrays for computation.
|
State newton''s third law of motion
: Newton's third law of motion can be stated like this: "For every action, there is an equal and opposite reaction." How are Le Chatelier's Principle and Newton's third law similar? How are they different?
|
Program that can serve as a simple calculator
: Write a program that can serve as a simple calculator. This calculator keeps track of a single number (of type double) that is called result and that starts out as 0.0. Each cycle allows the user to repeatedly add, subtract, multiply, or divide by..
|
Determine the center temperature of the product
: Determine the center temperature of the product afer 60 minutes if the convective heat transfer coefficient between the product and mbient air is 25 W/m^2 K.
|
How do a bubble sort in mips?
: How do a bubble sort in MIPS?
|
Commercial tablet was determined by titration
: The amount of aspiring (molar mass of 180.15 g/mole) in a commercial tabletwas determined by titration with NaOH. What mass of aspiring was in a tablet if 15.00 mL
|
Store a list of student info
: Store a list of student info, (id number, First name and Last name) using a link list. The ID is the key field. The program should implement a linked list using arrays.The program should process the following operations
|
Singly linked list
: Singly Linked List (SLL)Introduce a SLL class with the following functions. Please also introduce a main function that will invoke and verify whether the functions are implemented correctly
|
Compare the tax advantages of debt versus equity
: Compare the tax advantages of debt versus equity capital formation of the corporation for the client and debt or equity for capital formation of thenew corporation, based on your research
|