Question: Machine/assembly language need the answer asap 4. Translate the following C code to MIPS. Assume that the variables f, g, h, i, and j are
Machine/assembly language need the answer asap
4. Translate the following C code to MIPS. Assume that the variables f, g, h, i, and j are assigned to registers Ss0, $s1, $s2, $s3, and $s4, respectively. Assume that the base address of the arrays A and B are in registers Ss6 and Ss7, respectively. Assume that the elements of the arrays A and B are 4-byte words: [7 points] B[8] Ali]+ Ai]; 5. Assume that registers $s0 and $s1 hold the values 0x80000000 and 0xD0000000, respectively. [2 points] For the contents of registers $s0 and Ss1 as specified above, what is the value of St0 for the following assembly code? a) add St0, $s0, $s1 b) Is the result in St0 the desired result, or has there been overflow? 4. Translate the following C code to MIPS. Assume that the variables f, g, h, i, and j are assigned to registers Ss0, $s1, $s2, $s3, and $s4, respectively. Assume that the base address of the arrays A and B are in registers Ss6 and Ss7, respectively. Assume that the elements of the arrays A and B are 4-byte words: [7 points] B[8] Ali]+ Ai]; 5. Assume that registers $s0 and $s1 hold the values 0x80000000 and 0xD0000000, respectively. [2 points] For the contents of registers $s0 and Ss1 as specified above, what is the value of St0 for the following assembly code? a) add St0, $s0, $s1 b) Is the result in St0 the desired result, or has there been overflow
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
