|C code .vs. Assembly code for Microcontrollers/DSPs ? email@example.com (1996-03-01)|
|Re: C code .vs. Assembly code for Microcontrollers/DSPs ? firstname.lastname@example.org (David J. Starr) (1996-03-03)|
|Re: C code .vs. Assembly code for Microcontrollers/DSPs ? email@example.com (1996-03-03)|
|Re: C code .vs. Assembly code for Microcontrollers/DSPs ? firstname.lastname@example.org (Eyal Ben-Avraham) (1996-03-03)|
|Re: C code .vs. Assembly code for Microcontrollers/DSPs ? email@example.com (1996-03-03)|
|Re: C code .vs. Assembly code for Microcontrollers/DSPs ? firstname.lastname@example.org (1996-03-04)|
|Re: C code .vs. Assembly code for Microcontrollers/DSPs ? email@example.com (Andrew Cruickshank) (1996-03-04)|
|Re: C code .vs. Assembly code for Microcontrollers/DSPs ? firstname.lastname@example.org (1996-03-05)|
|Re: C code .vs. Assembly code for Microcontrollers/DSPs ? email@example.com (1996-03-05)|
|[47 later articles]|
|From:||firstname.lastname@example.org (Myles Barrett Williams)|
|Date:||3 Mar 1996 19:45:28 -0500|
|Organization:||Computer Science Dept, University of Tennessee, Knoxville|
|In-reply-to:||email@example.com's message of 1 Mar 1996 13:52:30 -0500|
firstname.lastname@example.org (Ravindra Divekar) writes:
I've heard people say so many times, that hand-crafted (assembly) code
is more compact than compiled C code for microcontrollers or DSPs.
So where is the problem?
Depending on what's important in your current project, it's not
necessarily a problem.
When someone writes a compiler, they have to come up with a method to
implement each feature of the language in assembly. For example, the
function call mechanism typically introduces significant overhead, but
it's necessary in order to have a generalized way of passing the
arguments to a subroutine.
On the other hand, when you code in assembly you are not constrained
by anyone else's model. Your function call mechanism can be different
for different functions, and you can usually trim a couple of
instructions here and there. But devising your own programming model
takes some extra development time.
Does the compiled code fit into your EPROM?
Did you get the program developed faster than you would have in
Will your program still be useful when a client wants to do the same
thing on another processor?
If you can answer yes to the first question, you have nothing to worry
about. The other two questions are icing on the cake.
Return to the
Search the comp.compilers archives again.