Computer Systems Architecture Lab: MIPS assembly language

profilebeoto01
lab1_for_reference.docx

Lab 1 – Mars IDE Introduction MIPS Assembly language

Programming with MARS IDE

The purpose of this lab is to introduce you to the layout and structure of the Mars IDE development tool. In this lab, the MIPS Assembly language is used. You will use this language to write your own programs during the semester.

Introduction to Mars IDE

MARS is a software simulator for the MIPS assembly language intended for educational use.

MARS may be downloaded from www.cs.missouristate.edu/MARS.

MARS tutorial can be found at http://cs.slu.edu/~fritts/CSCI140_F12/schedule/MARS%20Tutorial.pdf

Procedure:

I. After downloading the Mars software, just double click on the downloaded file. The following figure will show up.

Figure 1

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

III. You will find a blank file. Start typing the program below in the blank file.

( # ----------------------------Lab1------------------------------------ -- # ------------------ Add two numbers ------------- --------------------- # -------------------------By: Dr. Abdal lah---------------------------- # --------------------------- --- ----------------------------- li $s2, 100 li $s4,200 add $s6,$s2,$s4 ) The code:

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

Figure 2

V. The following screen will show up. Click on the following icon to Run the program

Figure 3

· Observe the registers values. Record these values in Table 1.

Table 1

Initial Value

Value

$S2

$S4

$S6

Questions:

1- Determine the instruction format for each instruction in the program

2- Determine the instruction content for each field per each instruction in the program

Things to turn in as your Lab1 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