The purpose of this lab is to introduce you to the layout an

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.

li $s2, 100

li $s4,200

add $s6,$s2,$s4

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

I\'m not sure how to use the Mars program to get this information.

$S2 $S4 $S6 Table 1 Initial Value Value I

Solution

The Instruction Format for each instruction in the program is given by , BasicInstructionFormat.Instruction_Format _FORMAT , They are R- format which works for register, I - format works for Immediate value , J- format which works for jump instruction.

1.

2. li $s2, 100 In the instruction the li is a pseudoinstruction call which puts the value 100 in $s2 ,

li $s4,200 in the instruction the value 200 is put into $s4 ,

and in the add $s6,$s2,$s4 instruction the result of the function is put into the register $s6 .

Instruction Format OP rs rt rd shamt funct address
li $s2, 100 I 8 $s2 $s2 $s2 0 - Constant
li $s4,200 I 8 $s4 $s4 $s4 0 - Constant
add $s6,$s2,$s4 R 0 $s2 $s4 $s6 0 32 -
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 w

Get Help Now

Submit a Take Down Notice

Tutor
Tutor: Dr Jack
Most rated tutor on our site