ARM > Introduction to ARM > Why Learn Assembly Language?
Remarks
Our goal is to write small, efficient, programs to run on our target platforms. We can’t always assume that compilers will make all the right choices. They make decisions on our behalf which we don’t get to know about. We need to understand what the compiler is doing and why it’s doing things in a particular way.
The C code you write is not the instructions which the CPU executes. It’s an abstraction which insulates you from the weaknesses and the strengths of the machine. We tend to forget this.
It’s also useful for knowing where you are when debugging at the low level. It’s useful because compilers aren’t infallible and can sometimes generate incorrect code. (We encountered a tool chain at Picsel which, in one instance, thought that N×10==N). Also knowledge of assembly language can help you understand the semantics of the compiler language more fully.