CDA3101-Fall2011-Recitation02

CDA3101-Fall2011-Recitation02 - Let A B $s0 $s7 Convert...

Info iconThis preview shows pages 1–6. Sign up to view the full content.

View Full Document Right Arrow Icon
CDA 3101 Recitation Session 2
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
C to MIPS f = g+h+i+j f = g+(h+5) What are the corresponding MIPS assembly code? Use a minimal number of MIPS instructions.
Background image of page 2
MIPS to C add $s0, $s0, $s1 add $s0, $s0, $s2 add $s0, $s0, $s3 add $s0, $s0, $s4 lw $s0, 4($s6) Let f, g, h, i, j $s0, $s1, $s2, $s3, $s4
Background image of page 3

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
Background image of page 4
Background image of page 5

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

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

Unformatted text preview: Let A, B $s0, $s7 Convert from MIPS to C If-then statement Find the MIPS instruction set for the following C sequence: A = A ? B : C Loop int a = 0; (while a < 5) a++; Convert this to a MIPS program MIPS Program Structure – See Word Document...
View Full Document

{[ snackBarMessage ]}

Page1 / 6

CDA3101-Fall2011-Recitation02 - Let A B $s0 $s7 Convert...

This preview shows document pages 1 - 6. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online