Winter 2001-2002 CS 232

CS 232 – Computer Architecture I Rose-Hulman Institute of Technology Computer Science and Software Engineering Department Lab 1 Questions

Answer the following questions as completely as possible and hand in before leaving the lab. 1. What is the address of main in p1.asm?

2. What are the values of $2, $3, and $4 at main in p1.asm?

3. What are the values of $2, $3, and $4 at the end of p1.asm? Hint: $2 is not 43, why?

4. How do you tell add from sub? Be sure to explain fully.

5. How many many instructions are needed for p4.asm?

6. How many registers are needed for p4.asm?

7. What is the opcode for lw? How did you determine it?

8. At what address does the array V start in main.asm? How did you determine the address? How many bytes are occupied by each element of the array?

9. What is the purpose of the sll $t0, $t0, 2 in main.asm? What happens when you comment it out? Be sure to explain why this happens?

14 August 2002 Page 1