How long will it take to learn Assembly? How long will it take to get good at it?

Quora Feeds

Active Member
Barry Rountree

[Update] Teaching yourself assembly in order to learn how to code is not a good use of your time. You're going to be spending far too much effort for far too little reward. Just getting something to print out on the screen might be two weeks of work. Start with python, then move to C, and then try tackling assembly.
While I understand where this question is coming from, I think there's a pretty fundamental misunderstanding behind it.
Let's start with a different question: how long would it take to write an optimizing (K&R) C compiler? Perhaps that's a one-semester class, and you certainly wouldn't need more than two. If you end up with a working compiler, can you be said to understand C? Well, at one level, certainly: you have accounted for all of the language features and your assembly code is correct. What else would there be to knowing the language?
But if I then started sawing off chunks of the linux kernel that are written in C and asked to you explain what they were doing, you'd be at a complete loss. You'd be able to describe what was happening at the level of variables being set and control flow, but you wouldn't have a grasp on the idioms or the problems that were trying to be solved.
The same would be true for any other nontrivial codebase written in C: you can understand the words, but not the sentences. The one exception? If I gave you a compiler written in C, you'd have no trouble understanding it. You (now) know how to write compilers.
So if you want to understand x86 assembly, that's probably a semester's worth of time. You'll know all of the words. But that won't let you look at debugger output and figure out where the compiler did something stupid. It won't let you find security holes in your C library. I won't let you write a device driver that relies on RMA.
So rather than learning all the words, I'd suggest focusing on the task you want to accomplish and learn just enough assembly to do that. That let's you get to the bits you care about much more quickly, you'll retain the information much longer. Do six or eight tasks and they'll start becoming easier.


See Questions On Quora

Continue reading...
 

Similar threads

Top