Friday, 16 October 2009

Talkin bout my (2nd) generation

So yesterday in Console Development we were exposed to the joys programming in assembler. I think the combinatation of having not slept much the night before and being in uni for twelve hours, left me feeling like I was a 10 year old being told the details and meanings of Plato's theory of forms during the lecture. However, once we got down to the actual programming part, I found that it's actually quite easy to understand, you just have to think a bit harder about what you're doing. Take this rather simple program:

ori $8,$0,0x2 # put two's comp. two into register 8
ori $9,$0,0x3 # put two's comp. three into register 9
addu $10,$8,$9 # add register 8 and 9, put result in 10

Then compare it to this line of C which does exactly the same:

X = 2 + 3

As annoying as it may be to some, I can't help but find it really interesting. It's amazing to see that what comes to us naturally has to be turned into 3 different tasks for a computer. Looking forward to my next Console Development lecture.

No comments:

Post a Comment