spring 2013 exam 2

Part c suppose stack pointer was pointing to address

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: xit if reaching the end of the array LW $4, 1000($1) # read element SLTI $5, $4, 10 # >10? BE $5, $0, Cont # if yes, continue SLT $5, $4, $0 # < 0 ? BNE $5, $0, Exit # if yes, break ADD $2, $2, $4 # add A[i] to sum Cont: ADDI $1, $1, 4 # manipulating index J Loop # Loop Exit: ADDI $10, $10, 1 # j++ 5/6 Question 4: 12 points Suppose there is a 32- bit system. The stack grows downward. The program below calculates the Fibonacci number, it uses recursive functional calls: #include <s...
View Full Document

This note was uploaded on 07/20/2013 for the course ECE 2035 taught by Professor Willis during the Spring '13 term at Georgia Tech.

Ask a homework question - tutors are online