William Donzelli wrote:
Assembly
language is still used quite a lot in the embedded systems
world.
Here we go again.
These days, assembly language programming is like cannibalism - lots of
people insist that it is still very much alive, but nobody has actually
ever seen it.
I think you'd be amazed at how prevalent it still is! It depends on
the market you are in.
For example, do you think the microcontroller in your mouse was
coded in anything OTHER than assembler? Or, the microcontrollers
in your CD-ROM drive? That's already twice as many processors
as there are "computers".
Now, look at the thermostat on the wall in your living room.
And the microcontroller *inside* your furnace (assuming you have
a newer model furnace).
My VCR has three microcontrollers in it. I have no idea
how many are in my stereo components, television, etc.
The code in the gasoline pump up the corner was written in
assembly language (unfortunately... it was the perfect
application to move to a HLL but... :< ).
I know of cameras written in ASM. I have a friend who is
just finishing the design of a LIGHT SWITCH -- written in
ASM.
I haven't check in some years but the biggest volume parts
were things like HC08's. Nowadays, PICs (if you treat the
entire family as a single 'part') probably are king of
the heap. Amazing when you think of how many PC's there
are and realize how *small* that number is compared to
all these other things!
I am just finishing a proposal for yet another product where
I am *sure* the client won't want to spend the money to support
a HLL. (Of course, he will undoubtedly grumble at the cost
of NOT using one, too!)
Apologies to the 100 or so engineers in the entire
field that may still
use it.
Well, when I look at all of the PRODUCTS out there, I guess
us 100 engineers must be writing a sh*tload of code!!
IMO, the key difference is you write these applications
*once*. There are no bugs (allowed) and no "upgrades".
You dare not have to RECALL 50,000 widgets because you
made a mistake and need to fix it. So you get it right
the first time and then the job is *over*. (e.g., my
Nakamichi Dragons have a stupid little bug in the
MCU that watches tape motion... no chance in hell that
it will ever be fixed -- or even acknowledged!) But,
thereafter, your production (and any savings from using
a cheaper implementation) just keep adding up.
Until you've had to reuse *bits* in a particular *byte*,
you're not really dealing with low cost items. :-(
It's really difficult to make the transition to
resource-rich applications... it's hard not to count
clock cycles, measure stack penetration (do people
even *know* how deep the stack needs to be on modern
desigs? Or, do they just keep bumping it up until
the code works??), pare data down to the smallest
necessary size, etc. (I still cringe every time I
use an int for a bool! :>)
Thankfully, most HLL's make bit-banging really difficult.
--don