Computer Science 220
Assembly Language & Computer Architecture

Fall 2010, Siena College

Lecture 07: MIPS Programming
Date: Tuesday, September 28, 2010

Agenda

Lecture Assignment 07

Due at the start of class, Thursday, September 30.

Please submit answers to these questions either as a hard copy (typeset or handwritten are OK) or by email to jteresco AT siena.edu by the start of class. We will discuss these questions at the start of class, so no late submissions are accepted. 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.