Question: ! ! ! THIS IS AN COMPUTER ARCHITECTURE ( CMPE 3 6 1 : Computer Organization ) LAB ASSAIGNMENT AND WILL BE SOLVED WITH MARS,

!!!THIS IS AN COMPUTER ARCHITECTURE(CMPE361: Computer Organization) LAB ASSAIGNMENT AND WILL BE SOLVED WITH MARS, MIPS SIMULATOR. I PUT THE THE DOCUMENTS NEEDS TO BE FILLED AND THE "task.asm" FILES AT THE END. THANK YOU IN ADVANCE!!
1. Introduction
In this lab, you will get introduced to MARS, the MIPS simulator, by writing and executing relatively simple assembly programs. The Mars program is a combined assembly language editor, assembler, simulator, and debugger for the MIPS processor. It was developed by Pete Sanderson and Kenneth Vollmar at Missouri State University.
2. Setup
2.1. Download MARS from LMS and uncompress it. The package contains MARS4_5 program and a tutorial. You need Java (JVM) to run it. Go through the tutorial to learn details about MARS.
2.2. Double click/open the Mars4_5 file. You shall see the following screen.
3. Tutorial
3.1. Create a new file.
3.2. Save the file as code1.asm.
3.3. Copy the code from example.asm(provided in the MARS.rar package) and paste it in your code1.asm
3.4. Assemble the code (i.e. convert it into machine code) by clicking assemble button on tool bar. And Execute window will be opened if there are no errors in the code.
3.5. You can control the speed of execution through speed bar, run the whole program at once or do single step execution. You can also reset all the registers and memory to initial state by pressing reset button.
3.6. Notice that initially all registers (except $gp) and data segment (i.e. Data memory) initially set to zero.
3.7. Press the single step button repeatedly to observe how execution of each instruction in the basic/source code affects the content of registers. Note that modified register(s) after each instruction are highlighted with the green color.
4. Assignment
For Task 1 to Task 3 bellow, fill the table and answer the questions given in the submitFile2p1.docx and submit to LMS.
Task 1: -40 Points
1. Open a new assembly file in MARS.
2. Save it with the name of myTask1.asm.
3. Copy the code provided in Task1.asm file in LMS to your myTask1.asm.
4. Single step through the code until it terminates and after execution of every instruction in the source code, fill the Table 1 in submitFile2p1.docx(given on LMS) by writing name of registers and address of memory locations, and their values that are modified by a particular instruction.
Task 2: -40 Points
1. Open a new assembly file in MARS.
2. Save it with name of myTask2.asm.
3. Copy the code provided in Task2.asm file in LMS to your myTask2.asm.
4. Single step through the code until it terminates and after execution of every instruction in the source code, fill the Table 2 in submitFile2p1.docx(given on LMS) by writing name of registers and address of memory locations, and their values, that are modified by a particular instruction.
Task 3: -20 Points
1. Open a new assembly file in MARS.
2. Save it with name of myTask3.asm.
3. Copy the code provided in Task3.asm file in LMS to your myTask3.asm.
4. Single step through the code until it terminates. The program terminates with an error. Explain the reason in submitFile2p1.docx.
We have to submit the work for Task 1 to Task 3. Fill the tables and answer the questions in provided submitFile2p1.docx file,
TASK FILES:
task1.asm:
.text
add $t0, $0,15
sub $t1, $t0,2
sw $t1,0x10000000($0)
lw $t2,0x10000000($0)
#The code written below is used to exit the program or terminate the execution
li $v0,10 # service 1 is print integer
add $a0, $t0, $zero # load desired value into argument register $a0, using pseudo-op
syscall
task2.asm:
.text
add $t0, $0,0x7f6b2684
sub $t1, $t0,2
sw $t1,0x10000000($0)
lb $t2,0x10000002($0)
#The code written below is used to exit the program or terminate the execution
li $v0,10 # service 1 is print integer
add $a0, $t0, $zero # load desired value into argument register $a0, using pseudo-op
syscall
task3.asm:
.text
add $t0, $0,0xff00ff00
sw $t0,0x10000002($0)
#The code written below is used to exit the program or terminate the execution
li $v0,10 # service 1 is print integer
add $a0, $t0, $zero # load desired value into argument register $a0, using pseudo-op
syscall
HERE IS THE "submitFile2p1.docx" THAT NEEDS TO BE FILLED AND SUBMITTED:
! ! ! THIS IS AN COMPUTER ARCHITECTURE ( CMPE 3 6

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!