Docsity

Introduction to Computer Engineering Quiz #12 | ECE 2030, Quizzes of Electrical and Electronics Engineering

Toggle sidebar
bg1
ECE 2030 Spring 2006 Quiz 12 (worth two in class quizzes)
Due to Dr. Heck by Thursday April 27 at 12:00 noon
Your goal is to write a MIPS assembly code program that includes a procedure that finds the
average of two vectors (so each element is averaged). The vectors are stored in memory with
the starting addresses given by the address labels A and B. You want to store the resulting vector
in the next available memory location after B. Use the following data section:
A: .word 11 14 -4 5 20 0
B: .word โ€“3 2 18 4 1 2
Pass the following arguments to the subroutine: the address of the first element in the sequence
and the number of values to average. Use the procedure call convention in your program. Turn
in a copy of your code, which is saved as a .s file, and a screen shot of the SPIM window after
you have run the code.

Partial preview of the text

Download Introduction to Computer Engineering Quiz #12 | ECE 2030 and more Quizzes Electrical and Electronics Engineering in PDF only on Docsity!

ECE 2030 Spring 2006 Quiz 12 (worth two in class quizzes) Due to Dr. Heck by Thursday April 27 at 12:00 noon

Your goal is to write a MIPS assembly code program that includes a procedure that finds the average of two vectors (so each element is averaged). The vectors are stored in memory with the starting addresses given by the address labels A and B. You want to store the resulting vector in the next available memory location after B. Use the following data section:

A: .word 11 14 -4 5 20 0 B: .word โ€“3 2 18 4 1 2

Pass the following arguments to the subroutine: the address of the first element in the sequence and the number of values to average. Use the procedure call convention in your program. Turn in a copy of your code, which is saved as a .s file, and a screen shot of the SPIM window after you have run the code.