Staging project 3.
Pulling in initial snippets provided by Bertscher.
Just commenting for now. I think I'll start using doxygen. Trying to figure out how I want to go about modularizing this code.
So many comments.
Alright. It looks like stats is working just like interpret for now. Which is good. It means I didn't mess anything up in the process of commenting and shifting some of the code around.
Alright. It looks like I've got part 3.1 of the assignment working.
Still don't have part 3.2 done. Not sure where I'm misinterpreting the datapath.
There-I-Fixed-It.jpg. Thanks Dr. Bertscher! Still not sure why 4am me thought nested if loops were correct, or why 5pm me looked at it and decided to just trust 4am me.
Wrapping up my initial attempt at solving part 3.3. Not completely finished fleshing out the switch(opcode) cases. That's boring. That's why I stopped to commit everything.
Holy fucking shit. That actually compiled\!
Well, it's not working as expected. But I'm not segfaulting either.
Damn OBOEs. Though it looks like I've actually got part of it right. The number of inputs produced 1 instructions ahead is correct, at least.
Well fuck. Now that's not right at all.
Wait a second... I was accessing i[12] of an array first declared as int i[12]. That shouldn't have even worked. It should have segfaulted. Anyway... hoping this puts me on the right track.
SON OF A BITCH. He specifically said in class only to count the NEAREST read to the write, not multiple reads at different points to the same write. But when I take out that stipulation --that is, I don't clear the write record at that element in the writeQueue[] array, I get the right answer according to the handout.
Pulling in messy project 3. Needs to be better modularized. But it works.
Merge branch 'proj3'.