CS 213 Fall 2000 Homework H1a
Homework H1a was handed out Tuesday, Sept. 12. It is due 11:59 pm, Monday, Sept. 18. All files needed for the assignment are in the directory
/afs/cs.cmu.edu/academic/class/15213-f00/H1a.
Notes
-
As solutions, the original C code can be found in the file
/afs/cs.cmu.edu/academic/class/15213-f00/H1a/probs-solve.c.
-
Note that you are required to work on this assignment individually.
Note also that this assignment will have only a small effect on your
grade. It's purpose is to give you some useful practice, not to
determine your course grade. You'll find this practice very useful in
preparing you for Lab 2.
-
The assignment handout suggests you try to make your C code generate
assembly code that is syntactically identical to the given assembly.
That's a good goal, but don't waste too much time trying to achieve
it. Depending on small variations in the C code, GCC will generate
different register allocations, different instruction orderings, and
other minor variations that have no effect on functionality. The
grading of the assignment will be based purely on whether your code
matches the functionality of the given code.
-
Sept 15, 14:00. The atest code uses the wrong names for the
last 3 procedures. To test these three you would refer to them
as if, while, or for when using the -f argument for atest, rather than
ifcode,
whilecode, and forcode, respectively. You can
either retrieve the modified .tar file, or just use the shorter names.
[Bug caught by Deryck Morales.]
Dave OHallaron
Last modified: Wed Oct 4 20:26:17 EDT 2000