Assn4 - memory in column-major form. That is, the entries...

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

View Full Document Right Arrow Icon
CDA 3101 Assignment 4 Due in class on Friday, Oct. 1 Assignments submitted after Oct. 1, 11:45am but before Oct. 4, 11:45am will be considered one day late. No submissions will be accepted after Oct. 4, 11:45am. Submit the programs (.s or .asm file) for all the problems below as attachments, via E-Learning Assignment Tool. You must use the E-Learning Assignment Tool to submit your code; you cannot submit your code using email. Also submit a hardcopy of these programs in class with your name and “CDA Assignment 4” clearly written on it. The TAs will use PCSPIM to run and test the program files you submit electronically. So, please test your code thoroughly using PCSPIM. If your code does not load/execute successfully in PCSPIM, you will get a 0. 1. (20 points) Write a MIPS program that finds and prints the sum of the main diagonal elements in a 3-by-3 integer matrix A. Assume the matrix A is global and is stored in
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: memory in column-major form. That is, the entries appear in order as: A(0,0), A(1,0), A(2,0), A(0,1), A(1,1), A(2, 1), A(0, 2), A(1,2), A(2,2). The program a. Prompts the user enter 9 integers one by one to fill the matrix A. b. Finds the sum of the main diagonal elements in the matrix A c. prints the sum value. 1. (30 points) Write a MIPS program that i. prompts the user to enter a string. ii. stores the string entered by the user in a global character array. iii. counts and then prints the number of letters in the set {a-m, A-M} and the number of letters in the set {n-z, N-Z} in the string entered by the user. You can assume that the user will not enter a string more than 15 characters long. You can assume that the string entered by the user only has lower case or upper case letters and no other characters....
View Full Document

This note was uploaded on 01/15/2012 for the course CDA 3101 taught by Professor Small during the Summer '08 term at University of Florida.

Ask a homework question - tutors are online