Compilers are very good at generating high quality assembler code with options for generating optimized code.
So why learn anything about assembler language?
- Assembler language is very close to the way the machine executes instructions.
- Looking at assembler language can show why some features of a high level language are more efficient than others.
- Being able to read assembler language contributes to being able to analyze an unknown executable program without having the source code.
- Understand enough details of machine code to exploit certain security vulnerabilities; for example, the buffer overflow attack.