Assignment2(2)

assignment2(2)
Download Document
Showing pages : 1 - 2 of 3
This preview has blurred sections. Sign up to view the full version! View Full Document
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: CSE/EEE 230: Computer Organization and Assembly Programming Assignment 2 Date assigned: September 24 th , 2012 Due date: 4.30 pm, October 3 rd , 2012 (at the start of the lecture) 1. [40 points] The following problems deal with translating from C to MIPS. Assume that the variables f, g, h, i, and j are assigned to registers $s0, $s1, $s2, $s3, and $s4, respectively. Assume that the base address of the array A and B are in registers $s6 and $s7, respectively. a f = -g - A[4]; b B[8] = A[i-j]; i. [10 points] For the C statements above, what is the corresponding MIPS assembly code? ii. [5 points] For the C statements above, how many MIPS assembly instructions are needed to perform the C statement? iii. [5 points] For the C statements above, how many different registers are needed to carry out the C statement? The following problems deal with translating from MIPS to C. Assume that the variables f, g, h, i, and j are assigned to registers $s0, $s1, $s2, $s3, and $s4, respectively. Assume that the base address of the arrays A and B are in registers $s6 and $s7, respectively. ...
View Full Document