Re: AVR Beginner Questions - Ports and Speed

From: Meindert Sprang (mhsprang_at_NOcustomSPAMware.nl)
Date: 02/10/04


Date: Tue, 10 Feb 2004 09:58:58 +0100


"David Brown" <david@no.westcontrol.spam.com> wrote in message
news:c0a40a$t43$1@news.netpower.no...
> If there are exceptions, then it is not a rule. The common opinion among
> PHBs is that C is "easier" than assembly, and therefore every embedded
> project should be written in C and not assembly. The reality is that C is
> much better than assembly for many types of tasks, but writing in assembly
> is much better for other tasks. And even when you are writing in C, an
> *understanding* of the assembly is essential - you can't understand a cpu
> architecture without understanding its assembly language, and you can't
> write small, fast and reliable code (in any language) for a cpu without
> understanding it properly. How good the code must be depends on various
> factors, such as the balance between time spent in development and the
size
> and speed of the required microcontroller, but writing top-quality code in
C
> requires that you examine the generated assembly code and have enough
> understanding to know how the generated code works, and how it can be
> improved upon. Whenever I start working with a new microcontroller, I
write
> my first few programs (often just test programs) in assembly - even if all
> the rest of the development will be in C.

AMEN!

Meindert



Relevant Pages

  • Re: How to understand huge code
    ... product) I feel very difficult understanding the complete code flow. ... writing it in a semi-programming language helps reduce clutter. ... For things like SQL, I ask myself what the SQL is retrieving ...
    (comp.programming)
  • Re: Twelve Assembly Lessons
    ... a "system tool" ... It sure seems to me that writing assembly ... code consists of stringing a bunch of assembly language statements ... about "stringing together instructions that result in an OS, ...
    (alt.lang.asm)
  • Re: Twelve Assembly Lessons
    ... like to hear your thoughts on why writing an "application" in assembly ... from the skills involved that have to ... "string assembly language statements together" to achieve some result, ... time, some level of assembly language programming skill is required, ...
    (alt.lang.asm)
  • Re: HLA v1.86 is now available
    ... conversion routine is one minute they aren't spending learning machine ... instructions and other true assembly stuff. ... If so, clown, when they are writing an Assembly Routine, ... into an assembly language course wouldn't have a clue about the ...
    (alt.lang.asm)
  • Re: OT: Was it really 25 years ago?
    ... But the writing, the science, the ... But there is something about participating in the process ... that we are lacking a whole layer of understanding. ...
    (uk.comp.sys.mac)