Nov 23, 2009 [16:00]
Hey, the Compiler Helpsession is today(Monday, November 23) from 6-7 pm in the Motorola room(CIT 165 - the room where the class is held)
    Oct 30, 2009 [19:52]
Clarifications about Life:

First of all, read the assembly style guide.
Next, a very important point:
Don't use global variables! E.g. the pointer to your current life array shouldn't be in your .data section, and it shouldn't be a "global register". It should be stored locally in a register and passed around but it should be stored in a register and passed around.
The actual declaration of the arrays should be in the data section. This will allocate space for them. But, the *pointers* to the arrays should be in registers, and they should be passed around to your subroutines.
The handout does say you can use global registers to store the arrays. The handout is wrong. There has also been internal confusion among us about this issue, so despite what you might have been told - no global registers.
You might notice add_live_cell doesn't take an array. It should just put the live cell on your initial array - the one that will be the source when you start calculating the next generation. Now some other stuff to keep in mind:
  • When entering a subroutine, always push $ra to the stack, even if you don't make any other subroutine calls. This will save you trouble later if you ever expand a subroutine and add a syscall/subroutine call inside.
  • When entering a subroutine, push any $s registers you use internally to the stack. $s registers are supposed to be preserved across calls, so if some code ever calls a subroutine of yours, the $s registers the code sees should look the same before and after your subroutine executes.
  • That being said, don't store unnecessary things in memory. For example, there's no need to save $t registers to the stack. You also shouldn't use stack space (or .data space) for stuff like indices and incrementors for your loops - those should be registers. Part of the reason is because it's slower on a real machine, and partly because it complicates the code.
    It's fine if one of your subroutines is putting the index in $s1, and then another subroutine is storing $s1 on the stack to preserve its value. We meant don't store the index directly on the stack - if you do, then every time you increment the index you'll have to access memory.
  • Don't forget your register tables at the top of each subroutine.
  • A stylistic point on comments - you don't have to be super verbose. For example:
      add $t3, $t2, 1          #add one to the variable stored in $t2 and place result in $t3
    It's preferable to write:
        add $t3, $t2, 1        #$t3 = $t2 + 1
    they both convey the same meaning. Even better is to have:
        add $t3, $t2, 1        #index = i + 1
    where you say in your register table that $t3 is the index, and $t2 is 'i'. This will make your code easier to read.
    Oct 26, 2009 [15:40]
The Life helpsession is today(Monday, Oct. 26) in the Motorola Room (the same room class is held in)
from 7-8 pm. See you there!

Also, the signup sheet for the Life Design Checks is on the door of the Fishbowl (CIT 271). They run from Tuesday through Friday.
    Oct 23, 2009 [04:00]
The alternate midterm is tomorrow (Saturday), October 24th in CIT 219 (The Language Lab). It starts at 1 pm.
    Oct 21, 2009 [01:15]
The midterm is today from 7-10pm in Barus and Holley, 168. Everything uptil and including the lecture on Monday (Oct 19) can be on the exam except for Moon 3. Good luck!
    Oct 19, 2009 [21:10]
There will be a short 5-10 minute tutorial on Mipscope at the beginning of class this Wednesday (October 21st).
    Oct 5, 2009 [19:30]
Hey all, Page 9 of the RISC handout mentions a paragraph about not gating the clock. It then says that if you want to use the "not clock" signal, you just draw a wire from the second clock output. This doesn't make sense in Logisim. In Diglog, the Clock has two outputs - clock and not clock. The Logisim clock only has one output. Therefore, if you really need to use the "not clock" output, we'll allow you to run the clock wire through one inverter. We've updated the handout accordingly.
    Oct 5, 2009 [23:15]
The homework descriptions were originally written with diglog in mind, and as such they usually talk about using buttons for input. In diglog, buttons were toggles that stayed down when you pushed them, then came back up when you pushed them again. Logisim buttons only stay pressed while you hold on them, which isn't very useful for testing most of our circuits. Because of this, any time that a handout talks about using a "button", if you're using logisim you should instead use an input pin. Just make sure that on the input pins that you use the property "Three State" is set to No. And please label them as well.
    Oct 2, 2009 [19:30]
The logisim and diglog files for Moon 1 are up on the website now. They are in the docs section of the website.
    Sept 26, 2009 [22:30]
We recently realized that the cs031_handin script for hw02 did not allow you
to submit the .circ files created by Logisim. We definitely encourage you
to try Logisim, so we've "fixed" the issue. If you did hw02 in Logisim and
you want to submit it, then run:

    /course/cs031/bin/cs031_handin hw02_logisim

Same deal for hw03: hand in hw03_logisim instead.
    Sept 6, 2009 [23:24]
Welcome to CS0310!

Our first lecture is Wednesday, September 9 in the Motorola room (CIT165) at 2:00 PM. Experience the Magic!