Computer Science 324
Computer Architecture

Mount Holyoke College
Fall 2009


Lecture 12: More C and Unix; MIPS ISA Overview
Date: Tuesday, October 27, 2009

Agenda

Lecture Assignment

Due at the start of class, Friday, October 30.

Turn in a short answers to the questions below. Please turn in a hard copy (typeset or handwritten are OK). We will discuss these questions during class, so no late submissions are accepted.

Show the memory allocation (both stack variables and variables allocated on the heap using malloc) and its contents for each of these situations from our class C programming examples.

  1. While executing the scanf function at line 26 of gcdmain.c. You may make up appropriate formal parameter names for scanf to represent the 3 parameters. Note that their types will be char *, int *, and int *.
  2. While executing the reduce_ratio function, just before reduce_ratio returns, when called from line 108 of ratios.c for i=1 (the second iteration of the for loop.