Computer Science 324
Computer Architecture

Mount Holyoke College
Fall 2009


Lecture 14: MIPS Programming
Date: Tuesday, November 3, 2009

Agenda

Lecture Assignment

Due at the start of class, Friday, November 6.

Recall the class example "shiftyproduct" that includes the following code snip:

  product = 0;
  while (y) {
    if (y&1) product += x;
    y >>= 1;
    x <<= 1;
  }

Suppose the variables x, y, and product are stored in registers $s0, $s1, $s2, respectively. Write clear and concise MIPS assembly code for the C code above.

Turn in a hard copy (handwritten or typeset). We will go over this at the start of class, so no late submissions are accepted.