Global Sources
EE Times-Asia
Stay in touch with EE Times Asia
?
EE Times-Asia > Embedded
?
?
Embedded??

Don't kiss assembly language goodbye

Posted: 02 Jun 2008 ?? ?Print Version ?Bookmark and Share

Keywords:assembly language? embedded system development? programming skill?

A number of readers wrote, wondering if assembly language has finally become obsolete. In a word: No.

No doubt it has died a merciful death in the PC and IT arenas, but assembly programming will always be an importanteven criticalskill for firmware developers.

It certainly has become somewhat marginalized, even in embedded development. Traditional C-resilient areas like interrupt service routines are now typically coded in a high-level language (if you can call C high-level). Complex processors with deep pipelines give the edge to compilers, which can optimize instruction ordering far more efficiently than a human. Even brain-dead low-end PICs have decent C toolchains now.

Survey data about language use typically shows that about 20 percent of firmware folks code at least some of the time in assembly. That's about four times Java's score, and pretty comparable to the sum of people using object-oriented features like inheritance or polymorphism.

The need to know
Every firmware engineer needs to know an assembly language. C pointers, which baffle too many, suddenly make sense in the context of address indirection.

How can someone with no assembly experience possibly understand the implications of register variables? Performance tuning, once one has optimized the algorithm, often comes down to fiddling with C constructs to generate the most efficient machine code.

Despite wonderful integrated development environments and debuggers that let us work with source code throughout the development cycle, endianness, vector tables and the like will always require understanding of what is going on at the machine-code level. Startup code and RAM test routines that can't use a stack come only from programmers proficient in assembly programming.

But more importantly, it's quite impossible to have any deep understanding of computer architecture without understanding registers, addressing modes and instructions. If a Java-only developer ever pondered CPU design, can you imagine the horribly complex room-full of logic the developer would envision?

"Here's the circuit that implements a formatted print instruction." Assembly has a pretty clear one to one mapping between the programming language and the underlying hardware.

I do think that increasing program sizes and globalization are leading to a new specialization in embedded systems development. Some firmware programmers work only in narrow niches and may indeed never use assembly.

Career suicide
But staying that far removed from the hardware is career suicide. The best developers, the ones everyone calls on to solve difficult systemic problems, know how the computer works in detail.

What do you think? Have you abandoned assembly language?

- Jack Ganssle
Embedded.com Columnist





Article Comments - Don't kiss assembly language goodbye
Comments:??
*? You can enter [0] more charecters.
*Verify code:
?
?
Webinars

Seminars

Visit Asia Webinars to learn about the latest in technology and get practical design tips.

?
?
Back to Top