• We’re currently investigating an issue related to the forum theme and styling that is impacting page layout and visual formatting. The problem has been identified, and we are actively working on a resolution. There is no impact to user data or functionality, this is strictly a front-end display issue. We’ll post an update once the fix has been deployed. Thanks for your patience while we get this sorted.

Considering taking a course on Assembly, is it worth it?

So I'm a college Junior Computer Engineering major and while my career is far from decided I like the embedded work I've done thus far (working with PICs mostly). I've had some mild exposure to assembly, but I've heard even for embedded systems the advantages of optimizing at that level are worth much less than they used to be thanks to Moore's law and such. My University offers a course in Assembly, but for me it's completely optional. Is it worth the time/money assuming I do embedded work as a significant part of my career? I'd like to take it just for the knowledge, but unfortunately other classes have to take priority if that's the only reason.
 
Is it worth the time/money assuming I do embedded work as a significant part of my career? I'd like to take it just for the knowledge, but unfortunately other classes have to take priority if that's the only reason.

I really want to say yes that it is worth it, however, I can't. Assembly is pretty simple to learn, so even a basic understanding will be good enough to get you by. You likely won't find a program entirely written in assembly unless it is some sort of old legacy system.

What is more likely is that some one off functions will be written in assembly (things that need high performance or access to a very unique processor feature) with the rest coded in C/C++. How much of that exists will depend on the company you work for.

Assembly will provide you with some good information on what is going on with your compiler and why some code is faster than other code. But that is stuff you can learn on your own. A good CPU architecture class will ultimately be more beneficial for this kind of stuff.
 
Learning assembly isn't about using it, it's about understanding CPU's at the lowest level.

This. It's a TON of work to do almost anything at all in assembly, so in most real-world usage scenarios, it just isn't necessary because modern hardware allows us to use higher level languages that are "fast enough" at whatever it is we are trying to do.
 
I didn't understand pointers until I learned assembly (as part of a microcontrollers course). Was worth it for me 😀 However, I've never had to program a micro in assembly at work. We use C++ (which blew my mind).
 
I would say yes. You're going to get a better grounding in registers, the stack, memory addressing, port i/o, interrupts, system calls, etc., not to mention executable file structure, than you will in any other way, imo.
 
If you intend to go into embedded systems, absolutely. Otherwise, probably not critical to know. Plus if you really know C well, assembly isn't too hard to learn if necessary in the future.
 
You should do it. I'm surprised you haven't been forced to learn it by the time you're a junior. My introduction to computer engineering class started with transistors, worked up the basic building blocks resulting in the basic understanding of a simple processor, and ended with learning basic assembly.
 
Even though I never wrote another program in Assembly after college, it was one of the most rewarding things to learn. Every time I did the simplest thing it gave me a rush because of the work I had to put into it.
 
Back when I took the class, I really enjoyed it. As others have said, it teaches a thorough understanding of how a CPU works, unlike C++ or Java. If you have the spare time, and if hardware interests you, go for it! I'm an electrical engineering major, so this class was a must, and not optional.

Debugging this is a breeze as well. Each line does exactly one thing, and if there is a compiler error, 99% of the time it points exactly to the line that is a problem. Stepping through each line can also tell you exactly what the program is doing at a certain instant.
 
What the others have said is probably true. However, back in '86, Assembly was the course that culled 60% of those who were pursuing Programming/Systems Analysis as a career. I was one of its' victims.
 
Learning assembly isn't about using it, it's about understanding CPU's at the lowest level.

100% worth it, even if you don't do embedded work.
I would say yes. You're going to get a better grounding in registers, the stack, memory addressing, port i/o, interrupts, system calls, etc., not to mention executable file structure, than you will in any other way, imo.


While may not be directly applicable to the future, the understanding that you get from it is well worth it.

This was my first graduate course.

Final was simple - turn in a piece of tape to the instructor.
On that tape had to be your program as wells as you name and SS# 5 times in ASCII.
And between each "name/SS run" had to be the same in binary.

The program had to read the binary; print out the ASCII read in the just printed ASCII and output the binary.

Tape was not allowed to be stretched or have extra slack. There was a ink pool that the tape had to run above. To much slack would cause the tape to get inked.

Purpose was to understand timers & interrupts as well as "image" processing.
 
Errata is one of the big reasons you need to learn assembly. Sometimes compilers produce results that hit an errata, and so you have to be able to understand the assembly in order to figure out why and where the compiled C code is failing.

If you dont know assembly then you're stuck trying to work around something without even knowing why it is failing. However, with today's tools and IDE's it is probably faster and easier just to work around errata by simply altering the higher level code so that it is functionally equivalent but does not call the instruction(s) that hit the errata. (Also today you can send an email to the producer of the compiler and stand a pretty good shot at getting a problem fixed quickly, whereas 10 years ago you'd have to wait for months to get an updated compiler.)
 
Hmmm. Well thanks for input guys. No time for it this fall, but I'll definitely look into squeezing it into the Spring. Thanks!
 
Back
Top