see below, please. regards,
Richard Erlacher ----- Original Message ----- From: "Richard Gray" <[EMAIL PROTECTED]> To: <sdcc-user@lists.sourceforge.net> Sent: Sunday, September 07, 2008 11:17 PM Subject: Re: [Sdcc-user] documentation & open source generally > On Monday 08 September 2008 05:46:03 Richard Erlacher wrote: > <snip> >> Actually I haven't used it myself at all. I've used ASEM-51 which is a >> macro assembler, and on my 'XP box it assembles a >4000-line block of ASM >> code into a .HEX file in the time it takes me to remove my finger from >> the >> <enter> key. The object code occupies somewhat over 8kB of code space. > <snip> > > The very thought of 1,000's of lines of assembly language makes me > shudder. I > would have nightmares. While C is imperfect in many ways, I would rather > try > and maintain or debug a C source than (especially someone else's) > assembler > source any day. My nasty little recursive factorial routine using long > ints > (64-bits) was only about 900-bytes long once compiled and linked, which I > thought was pretty good. It's fairly stack hungry, but then again it was > meant to be. I thought SDCC made a pretty good job of it, all told. > You shouldn't let things such as that scare you. If you maintain order and discipline within your code, you can do it. ... easily ... and most assemblers have no quirks that would "mess you up" as HLL's often do. Believe me, the possibility that a HLL reduces the line count is not necessarily a blessing. What matters is the way in which the code is organized. Most MCU code is small, and even if quite large, it's often mostly table space. I often generate tables in a HLL on the PC (in BASIC, ... sometimes ... <cringe> ...) and then paste the output into an ASM source file. I come from that generation that was happy to have 256-byte EPROMS (they were reuseable!) so I try to be thrifty with code space. Compilers don't always help much with that. 4 k-lines? That's a small program. I would find something longer than 100 k-lines difficult to manage, would consider a HLL at 250 k-lines, and certainly would use a HLL if it got to be twice that long. Fortunately, MCU's generally don't require that much code. > -- > Richard. > PGP Key-id: 0x5AB3D350 > > ------------------------------------------------------------------------- ------------------------------------------------------------------------- This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ _______________________________________________ Sdcc-user mailing list Sdcc-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/sdcc-user