Midterm 1 Review Quiz

Translate the following snippet of c code to mips use

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: ________ Question 5 [15 points]. Translate the following snippet of C code to MIPS. Assume that the variable total is in $s0, N is in $s1, and i is in $s2. // C code to translate int total = 0; for (int i=0; i<N; i++) total += i; Question 6 [15 points]. Translate the following snippet of C code to MIPS. Use the traditional MIPS conventions for argument passing, return values, and adjusting the stack pointer. Assume...
View Full Document

Ask a homework question - tutors are online