Re: C code .vs. Assembly code for Microcontrollers/DSPs ?

koopman@cs.cmu.edu (Phil Koopman)
8 Mar 1996 19:17:44 -0500

          From comp.compilers

Related articles
[10 earlier articles]
Re: C code .vs. Assembly code for Microcontrollers/DSPs ? max@gac.edu (1996-03-06)
Re: C code .vs. Assembly code for Microcontrollers/DSPs ? rhn@sgi.com (Ron Nicholson) (1996-03-06)
Re: C code .vs. Assembly code for Microcontrollers/DSPs ? yatesc@csee.usf.edu (1996-03-06)
Re: C code .vs. Assembly code for Microcontrollers/DSPs ? cdg@nullstone.com (1996-03-07)
Re: C code .vs. Assembly code for Microcontrollers/DSPs ? thinklab@earth.usa.net (1996-03-08)
Re: C code .vs. Assembly code for Microcontrollers/DSPs ? tchannon@black.demon.co.uk (Tim Channon) (1996-03-08)
Re: C code .vs. Assembly code for Microcontrollers/DSPs ? koopman@cs.cmu.edu (1996-03-08)
Re: C code .vs. Assembly code for Microcontrollers/DSPs ? hbaker@netcom.com (1996-03-08)
Re: C code .vs. Assembly code for Microcontrollers/DSPs ? mac@coos.dartmouth.edu (1996-03-08)
Re: C code .vs. Assembly code for Microcontrollers/DSPs ? cdg@nullstone.com (1996-03-08)
Re: C code .vs. Assembly code for Microcontrollers/DSPs ? regnirps@aol.com (1996-03-10)
Re: C code .vs. Assembly code for Microcontrollers/DSPs ? rjridder@knoware.nl (Robert Jan Ridder) (1996-03-10)
Re: C code .vs. Assembly code for Microcontrollers/DSPs ? rfg@monkeys.com (1996-03-14)
[33 later articles]
| List of all articles for this month |

From: koopman@cs.cmu.edu (Phil Koopman)
Newsgroups: comp.compilers
Date: 8 Mar 1996 19:17:44 -0500
Organization: Carnegie Mellon University, EDRC
References: 96-03-006 96-03-025
Keywords: optimize, DSP, architecture

"David J. Starr" <dstarr@pop-3.std.com> wrote:


> For ordinary micro controllers (6805, z80, 8051 etc) a good C
> compiler will do code tight enough for production work. It will do
> better code than 9 out of 10 programmers can do,


And the company that employs the 10th programmer is going to eat your
lunch with their assembler code that is smaller and faster (and yes,
even 10% makes a difference on 100K or 1M units shipped). The
high-volume embedded world is very different than "everyday" desktop
computing. Mostly assembler is still King in small micros that have
only on-chip storage (i.e., much/most worldwide microcontroller
market).


> and the gains in speed of development and ease of maintainance make
> compiler use a sound decision.


Yes, you should use HLLs whenever possible. But, in high-volume
low-cost embedded applications it may still not make sense. Writing
500 or 600 bytes of assembler is seldom the limiting factor when
compared against tool&die costs for the mechanical stuff.


> I would certainly question the competance of an organization that
> started a serious product using assembler on a ordinary micro nowadays.


I know of "serious" new products that are in assembler. The
organizations are, by and large, competent. They just want to make
money against their competition too.




What's my point? "Assembler is dead" has been proclaimed since the
opening shots of the RISC/CISC wars. Assembler is still alive and
thriving. But, you have to really understand the tradeoffs before you
use it. It has its place, just like every other language.


-- Phil


Phil Koopman -- koopman@cs.cmu.edu -- http://www.cs.cmu.edu/~koopman
--


Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.