Re: C vs C++ in Embedded Systems?

From: Dave Hansen (iddw_at_hotmail.com)
Date: 01/31/05


Date: Mon, 31 Jan 2005 17:52:15 GMT

On Sat, 29 Jan 2005 18:12:10 GMT, Ed Beroset <beroset@mindspring.com>
wrote:

[...]
>
>int numerator = 35323;
>int denominator = 1038;
>int answer = numerator / denominator;
>
>On an 8-bit micro with no native divide instruction, this can generate
>quite a bit of code even though there was no obvious library call.

As well as the wrong answer. Or at least, not the answer that was
probably intended...

Regards,

                               -=Dave

-- 
Change is inevitable, progress is not.


Relevant Pages

  • Re: micro power square wave oscillator
    ... 50% duty cycle. ... I tried out some schematics around a 4007 but none can ... An MSP430 micro might be able to do that, ...
    (sci.electronics.design)
  • Re: micro power square wave oscillator
    ... 50% duty cycle. ... I tried out some schematics around a 4007 but none can ... An MSP430 micro might be able to do that, ...
    (sci.electronics.design)
  • Re: C vs C++ in Embedded Systems?
    ... Ed Beroset writes: ... consider the C language fragment: ... > On an 8-bit micro with no native divide instruction, ...
    (comp.arch.embedded)