University of California, San Diego
Dept. of Computer Science and Engineering
CSE 30 โ Computer Organization and Systems Programming
Problem Set #3 โ Due 2pm October 20, 2009
MARS (30 points)
The following questions are based on FIR_Filter.txt file
(http://www.cse.ucsd.edu/~kastner/cse30/FIR_Filter.s). Start by loading this file then answer the
following questions:
1. What's the address of the first instruction in your code (addi $sp, $sp, -4)?
2. What's the content of $a0, $a1, $a2 after the instruction "jal FIR" is executed? (For extra
credit, explain why)
3. What is the beginning address of in_array? csnt_array? (Hint: the instruction la takes two
arguments; the first is the destination register for the address from the second argument.)
4. What's the value of $ra AFTER the jal FIR instruction is executed? (For extra credit,
explain why)
Set a breakpoint at instruction 0x00400088 and run the program until you hit that breakpoint:
5. To which instruction does this breakpoint correspond (note: this instruction should appear
in the FIR_Filter.s file?
6. What is the value of $t0?
7. What is the value of $t4?
8. Why is $t3 significantly larger than $t0?
9. What's the content of the address that $t3 points to?
Set another breakpoint at instruction 0x004000b0 and run the program until you hit this
breakpoint:
10. What's the value of $t3? $t5?
11. What's the value that $t3 is pointing to?