Re: Microcontroller Project



In article <f62i22h2f7pa74m8q7a60meo56gf356v6e@xxxxxxx>,
speffSNIP@xxxxxxxxxxxxxxxxxxxxxxx says...
On 27 Mar 2006 20:39:55 -0800, the renowned "David L. Jones"
<altzone@xxxxxxxxx> wrote:

Your choice, and that's fine. I'd rather halve my development time than
save a few bytes of RAM.

Compiled code is usually a bit *better* at RAM usage because the
compiler very agressively overlays automatic variables in functions.
Of course that doesn't help you with statics and globals.

Good luck with automatic variables in an 8051. Remember, you only
have 128 bytes and about half of that taken for other purposes.
It's been a few years since I used an 8051, but I don't recall any
sort of stack frame either. Being this limited I simply can't see
how C is going to save much of anything.

OTOH, examples that show C being similar to assembly in code memory
usage and performance are usually contrived or do things that C does
rather well (eg. a TCP/IP stack).

I don't think I'd care to do a TCP/IP stack in an 8051 either. ;-)

--
Keith
.



Relevant Pages

  • Re: Microcontroller Project
    ... Compiled code is usually a bit *better* at RAM usage because the ... compiler very agressively overlays automatic variables in functions. ... Good luck with automatic variables in an 8051. ...
    (sci.electronics.design)
  • Re: Microcontroller Project
    ... Compiled code is usually a bit *better* at RAM usage because the ... compiler very agressively overlays automatic variables in functions. ... Good luck with automatic variables in an 8051. ...
    (sci.electronics.design)
  • Re: Microcontroller Project
    ... Compiled code is usually a bit *better* at RAM usage because the ... compiler very agressively overlays automatic variables in functions. ... rather well (eg. a TCP/IP stack). ...
    (sci.electronics.design)

Quantcast