Brad Parker wrote:
William Donzelli wrote:
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.
Apologies to the 100 or so engineers in the entire field that may still
use it.
I have to agree. I do a reasonable amount of paid work on micros and
almost all of it is in C. The only exception is PIC's, which are
generally done in assembler.
PICs are poorly suited for C because the stack is either too small
(on some devices) or inaccessible (on many devices). So, you have
to implement the stack as a discrete structure, etc. How do you
spell KLUDGE?
don't get me wrong - I love assembler, but most
paying customers want
the work in C for maintainability.
In my experience, this has only been for small projects (in terms
of volume). E.g., medical instruments, higher end DATAC, etc.
Things that you can -- and probably *will* -- upgrade.
I worked on an electronic *door* lock. The cost of upgrading
the software (i.e. just removing the locks from the door and
replacing their contents) would exceed the cost of the lock
itself! I.e. they will *never* be upgraded -- unless they
come out with a new model (and owners of the old model
will surely not replace every lock in their hotel just for
some "new feature").
Even FLASH reprogrammable MCU's aren't cost effective for
software upgrades (unless they are on a wireless link or
you are servicing them via sneakernet on a regular basis).
One client told me it costs him $600 to send a guy "into the
city" for a day. So, that's 100 of a $6 item. Means if
he replaces one every five minutes, the company has now
spent ~$20 on each $6 product (the $6 product, the $6
replacement and $6 in labor). So, the 3.5X DM+DL sell
price suddenly is shot to hell (i.e. you sold it for $20
originally and you've now spent $20 on each sale!)
All the AVR and HC11/12 (6800) work I've done has
been in C as well as a
handful of odd-ball cpus. Even 8085's. And these days most of that is
shifting to small pin count ARM SOC's like the SAM7S.
The joke these days is that the CPLD next to the CPU has 4x the pins!
Ah for the resources in a CELL PHONE!! :-/
--don