Question: COE 2 2 4 : Computer Organization and Architecture I LAB 8 : Procedures / Functions Objectives To learn and practice writing procedures / functions

COE 224: Computer Organization and Architecture I
LAB 8: Procedures/Functions
Objectives
To learn and practice writing procedures/functions in MIPS instruction set and the different ways of passing the parameters.
Requirements:
A desktop or laptop computer.
Download the SPIM simulator (QtSpim).
Background:
Read and exercise Section 8.0 Procedures/Functions on Pages 67-83 in the Lab-Manual: "MIPS Assembly Language Programming using QtSpim By Ed Jorgensen, Ver 1.1.14, Jan 2016.
Simulation:
Write and simulate a MIPS assembly-language routine that uses a procedure called LISTADD to add the elements of an integer array. The array, along with its length, is stored in memory words. Use the array: 23,-2,45,67,89,12,-100,0,120,6. The arguments passed to LISTADD are the base address of the array (passed through register $a0) and the length of the array (passed through register $a1). The procedure LISTADD returns the result in register $v0. The main procedure saves the result in memory and prints it on console preceded by an appropriate text message. Procedure call should look like the following:
Results:
q,
q,
q,
q,
q,
q,
q,
q,
COE 2 2 4 : Computer Organization and

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!