Re: Learning embedded systems

From: Jonathan Kirwan (jkirwan_at_easystreet.com)
Date: 03/02/05


Date: Wed, 02 Mar 2005 04:28:05 GMT

On Wed, 02 Mar 2005 09:34:12 +0800, Dan <dan@dontspammecauseidontlikit.com>
wrote:

>On Tue, 01 Mar 2005 20:58:02 GMT, Jonathan Kirwan
><jkirwan@easystreet.com> wrote:
>
>
>>I expected the disagreement, Dan. No problem.
>
>I had a feeling I might cause a bit of controversy with my original
>statement. :-) Thanks for you thoughts.

No problem, as I said.

>>I'll just say that packing 16k lines of C++ into a project, with only 20 lines
>>of assembly, this means to me that you are probably programming on a relatively
>>general purpose computing platform and perhaps even with some unstated library
>>or operating system support that you forgot to mention, as well.
>
>I'm using a 16 bit processor with a bit of memory and some serial
>ports and i/o pins. If that's not embedded I don't know what is. The
>only os type support that I have, queues and timers and such, is what
>I've written myself. The compiler has some standard C library
>routines, all the more reason to use C.

Sounds embedded.

>>Those special skills may include:
>> * analog and digital design skills
>> * schematic reading skills
><snipped>
>
>I agree with you here, these are all useful skills. But knowledge of
>assembly would be at the bottom of my list. I'll pick up an
>oscilloscope lead 100 times before I'll look at the assembly output of
>the compiler.

That's not what I brought up, though.

>Even 8 bit processors and little PICs have C compilers. People keep
>telling me how you need assembly to optimise for either speed or size,
>but I've never found a need for it. Maybe that was the case 20 years
>ago when memory size and processor speed and was more of an issue.

I've written, many times here in this group in the past, specific and useful
semantics that simply are not available via a C or C++ compiler. Look it up via
google. That you are NOT aware of them makes my point clearly.

>It's much more difficult to write structured code in assembly
>language.

Which, true or otherwise, doesn't bear at all on why I said what I said.

>It takes way longer to write and it's harder to debug.

Sometimes. But that statement is most certainly true if you refuse to become
competent at it. When you aren't skilled at it, it's a given that you'd be
right.

>It's also a lot harder for someone else to come in afterwards and look
>at the code.

... and if you are hiring, it may be easier to find programmers who are familiar
with C. I won't argue.

>I can't imagine anyone writing anything in assembly
>unless they absolutely had to, and I can't see very many places where
>there's really a need.

My point is that good familiarity with assembly, whether or not it is required
for a specific project I have in mind, is valuable in my mind. Having more
thinking tools, not less, is better.

I'd suggest to you that you think about the fact you don't even recognize some
of the unique values concerned. I fully understand your points about C/C++ and
I agree with the value of using such languages in embedded work. Yet you do NOT
understand my points. Perhaps this is because of your lack, not mine. Just a
thought for you to ponder.

Jon



Relevant Pages

  • Re: WWDC -- MacBook Pro?
    ... ....but once the program has loaded it into its program memory, ... boundaries, int16 are aligned on 2 byte boundaries, int32 are ... people are always able to come up with the compiler ... Case B, same glass, same ice code water.  ...
    (comp.sys.mac.system)
  • Re: Javas performance far better that optimized C++
    ... The compiler is extremely stupid. ... no memory leaks are guaranteed. ... However I have GC in my .NET programming. ... "C.9.1 Automatic Garbage Collection ...
    (comp.lang.cpp)
  • Re: Compiler and How It Handles Scope
    ... VB's compiler isn't really "state of the art" David. ... memory, no matter how many processes map the code into their virtual address ... words, no real distinction is made between Public/Private variables, or even ... > Modules can contain Public and Private variables, ...
    (microsoft.public.vb.winapi)
  • Re: WaitForSingleObject() will not deadlock
    ... Whatever memory values a thread can see when it creates a new thread can ... that later locks the same mutex. ... standardized multithreading library designed to run efficiently on existing ... A C compiler is not required to do this, and it can still be a conforming C ...
    (microsoft.public.vc.mfc)
  • Re: Delphi for XCode?
    ... memory, and that it moves blocks when they are promoted to the next generation, ... Of course you can have the compiler execute e.g. an array of events. ... But what does COM have to do with MY interfaces? ... Mono is using Boehm as well. ...
    (borland.public.delphi.non-technical)