Spring Semester 2007

January 22, 2007 – April 27, 2007

Code

This page collects example code in one place, mostly partial "solutions" to the homework assignments, but some additional stuff as well. Note that "solutions" come with no warranty of any kind: if you use them as part of your assignments, you are responsible for any errors they may contain. That said, we'd appreciate an email if you really do find a bug, and I am certain that there are a few left... :-)

Here's an example of a complete SIMPLE program and all the basic kinds of output we'll turn it into over the course of the semester. Unless there's a new bug, you should be able to run the *.s MIPS output on SPIM to see what the program does. Let me know... :-)

And here we collect the test cases we used to grade your assignment (if we have some). If you think there's a mistake in our solution (possible!) feel free to ask.

And here are a few more tests, submitted by students. :-)

Pretty much unrelated to the stuff above, here's a very basic interpreter/compiler for arithmetic expressions.

If you have comments or questions about these code examples, please bring them up in lecture or on the discussion list.