Spring 2008 Prog 2

Spring 2008 Prog 2 - element number XXX having a value of...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
CSC 320 Spring Semester 2008 Programming Assignment Two Due February 7, 2008 Write a MIPS program which will establish a 15 element array of integers with the following values: 3,6,1,45,87,23,90,33,65,21,12,40,55,82,8 Have your program call a procedure (separate from main), which will traverse this array once, comparing the values of each pair of adjacent elements. If the value of the first element is greater than that of the second element, this procedure swap the values of the two array elements and print a message “Array
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: element number XXX having a value of YYY, was swapped with its successor which had a value of ZZZ. At the end of the pass, have the main print: The array was traversed and RR swaps were made on pass XX. Follow the usually procedure WRT materials to be turned in. The purpose of this program is to illustrate the differences in the way that registers and memory locations are handled and to illustrate use of function calls....
View Full Document

This note was uploaded on 02/10/2012 for the course CSC 320 taught by Professor Simmons,w during the Spring '08 term at S. Alabama.

Ask a homework question - tutors are online