Write your answers out on paper, and hand it in on the due date.
Recommended: Fix Exercise 3.6 and run the code on the MIPS simulator. You will need to add a label, main, to the beginning and to terminate the program with a syscall. Here is a sample program that illustrates comments, directives for data, and using syscall. For more details, see Appendix A of the book.
# Program to add two numbers .data # Begin Data Segment num1: .word 123 num2: .word 321 .text # Begin Code Segment main: lw $t0, num1 lw $t1, num2 add $s1, $t0, $t1 li $v0, 10 # "Exit" code for syscall syscall .end