Tuesday, February 13, 2007

ADDQ #0,0D

At work recently I have spent the better part of around 3 days looking over some code that was malfunctioning. This particular piece of code is code that has been in our products for probably the better part of a decade. Recently it was updated and part of the update necessitated changing some data types from char to int. To cut a long story short, the problem wasn't actually due to any mistakes in the C code at all, but due to a bug in our cross compiler. Fortunately, our office eccentric is also an assembly language hero who was able to study the assembler listings our compiler generated and eventually determine that part of a register was not getting cleared.

Which got me thinking, how would we have solved this problem without someone like that to help us? I wasn’t taught anything about low level programming at university past the fact that it existed, they were too busy teaching me how to make polymorphic C classes and why I should never use arrays over vectors. It wasn’t even an option on the software engineering course, but as we all know, things go wrong, and eventually someone’s still got to know how to communicate with the computer at the lowest levels, especially when programming embedded systems. I can’t help but wonder where the next generation of assembly language programmers are going to come from, now that assembly language isn’t fashionable any more. After all, it is not like assembly is just some obsolete language like Cobol we can happily discard.

If this post as piqued your interest, go check out http://www.monroeccc.edu/ckelly/EASy68K.htm - I really should, but you know, there’s still so much more C++ I need to learn :)

No comments: