September 25, 2013

A New Year, A New Language

At the end of August, I started my second year at Rochester Institute of Technology as a Computer Engineer.


Until now, all of my programming experience has been with high-level, object-oriented languages. This semester, however, I will be learning assembly language (specifically for the Freescale HCS12)!


So far, I have only written one program in assembly, just a short program to evaluate the following expression:

(-45)+6+(13*2)-(7*4)-65+33


Assembly is a bit different, as it is not an object oriented language, and commands are 1:1, meaning that each command does exactly one thing. For example, the following code:

ldaa #55
ldab #55
aba
staa someVar
END

... loads the number 55 into register A, then loads the number 55 into register B, adds B to A, and then stores the contents of A in a variable called someVar (which will have been defined previously in the file as a variable with a length of 1 byte).

Eventually I'll be working on device programming and rudimentary object manipulation. This will eventually get to be harder, but I like a challenge!