August 4, 2023

Assembly Language - why learn assembly language

You can read a variety of opinions about this in the comments sections of the Hackaday articles. Here are my opinions.

Anyone who is serious about computers and software should learn at least one assembly language, and better yet several. You don't really understand computers until you understand them at the assembly language level.

I don't advocate assembly for "getting things done". For that I recommend either C, or something like Python depending on the nature of the project. If you need access to hardware registers (such as GPIO), use C. If you need to read and write files and want a GUI front end, use Python. These are of course general rules of thumb.

It used to be the case that you might choose assembly "for speed". These days compilers are so good, that you can rarely do better coding in assembly and assembly is much less productive and much more error prone than coding in C. A good C programmer can pretty much visualize what assembly will be generated for instructions he writes.

If you are writing operating systems, you will need assembly for some things that you simply cannot get at from C. Certain processor control registers for example. Often times inline assembly is the best approach here.

But I recommend learning assembly language simply to expand your mind. I recommend learning Haskell for exactly the same reason. It is interesting that Haskell and assembly lie at opposite ends of an abstraction spectrum, but now I am waxing philosophical. The best languages for getting stuff done lie more in the center.


Feedback? Questions? Drop me a line!

Tom's Computer Info / [email protected]