Often I hear people around me who like to discussion about writing in assembly language and which is one of those reasons I'm also want to learn to write it. Currently I'm learning assembly and C together.
So, my question is when do you ever need to write assembly in real code?
Is it just good to learn?
Are there are any real uses of it when writing code in C?
Any helpful comments or answers will be appreciated!
Despite the fact that writing code in assembly became increasingly rare, it is still very good to learn assembly simply to understand how things work under the hood. Modern optimizing compilers of C/C++ let you write code in C that translates into assembly instructions of very high quality, often surpassing what you could write manually at the expense of making the result less readable (e.g by inserting empty instructions to optimize the use of CPU's pipeline).
If you write a compiler for a new architecture, a very low-level library, or an embedded system with strict resource constraints, you may need to use assembly. For everything else, C and C++ will do as well or better.
I was going to write a long post but decided to summarize instead:
It's rare. I've never had to in 23 years + of career. But I work in the Client Server DB application space mainly, there are jobs where you'll use it a lot, or at least need to know how processors actually work.
However it was the first thing I learned, not counting basic digital electronics, and I'd say the learning has been a great help over my career and hobby programming.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With