Question: Launch the MARS simulator by double clicking on the icon. Use the loop, array, branch and jump implementation concepts in this lab. In this lab

  1. Launch the MARS simulator by double clicking on the icon.

  1. Use the loop, array, branch and jump implementation concepts in this lab.

  1. In this lab you will copy a character array (srcArray) to another array (destArray).

  1. The contents of the srcArray : "The MIPS architecture is a Reduced Instruction Set Computer (RISC). "
  2. Allocate 100 bytes for the destArray
  3. Copy the contents of the srcArray to the destArray
    1. You will use lb and sb instructions instead of lw and sw instructions
    2. Increase the memory address by one bytes for every iteration
    3. You will compare the loaded byte from the srcArray to 0x00 to find out whether you reached to the end of the srcArray. In lab5 you used the size of the array to implement the branch condition, but in this lab you will use the content of the srcArray to find out the end of the array. The srcArray is null terminated.

Ex. beq $t3, $zero, DONE #$t3 has the byte read from srcArray

  1. Display the contents of the destArray
  2. Display the size of the array (make sure to display a message Size of the array = before you show the size

  1. Assemble and execute the code and also observe the output.
  2. Create another assembly code file lab06_2.asm. Copy all the codes from Lab06.asm to this new file.
  3. Modify the code by replacing beq instruction with bne and also by making other related changes

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 Databases Questions!