Computer Systems Architecture / Microprocessors - Labs

profilebeoto01
it321_m6a2_lab_procedures.doc

Lab 4 –MIPS Assembly language

Programming with MARS IDE Procedures

The purpose of this lab is to introduce you to the layout and structure of the Mars IDE development tool in addition to Procedures programming. In this lab, a procedure is called to sort three numbers (ascending sort) in the memory.

Procedure:

I. Follow the same procedure in Lab1.

II. From the main menu, choose “File” “New”

III. You will find a blank file. Start typing your program. The main program and the procedure

Type the program provided below in the screen shot.

IV. Click on the icon “Assemble the current file”

V. Run the given program

· Observe the registers/Memory locations values after each Step Run. Record the final values.

· Use $t0, $t1, and $t2 to hold the numbers after the ascending sort. What are the final values of $t0, $t1, and $t2?

Things to turn in as your Lab 4 Report, attached in this order:

1- Your name, Course Number, Lab Number and Date

2- Screen shot of the Program

3- Results/Observations such as the final screen shot of the registers and memory locations

4- Questions with answers

6- References if any