Re: A86: What C-compilers have we got? [82/83/83+/85/86]


[Prev][Next][Index][Thread]

Re: A86: What C-compilers have we got? [82/83/83+/85/86]




On Sun, 12 Nov 2000, Adam Thayer wrote:

> This leaves you with a grand total of 24k in the 86's case. NOT enough
> for an extensive C program.

The actual amount of RAM you can get is a little more than that.  For one
thing, the program space is actually about 9K.  Also, you have graph
memory, text memory, the stack, and of course the video buffer.  It all
really adds up to a total of a little over 27K.

But that doesn't matter that much.

The real question is, just how much bigger do you think C code would be,
if an optimizing compiler were used?  This is mostly a hypothetical
discussion since none currently exists.  However, the size of code
generated by GCC (a fairly good, but not perfect, compiler) on other CISC
architectures can give some idea.

If your opinion is that the C compiler's code is only 25% larger than
assembly code, then I'd probably have little more to say beyond that, with
lots of space taken by various data (text, graphics, etc.) this doesn't
matter at all, and is certainly worth the much greater amount of software
development that could be achieved.

If you think it's much larger (e.g. 2x the size or more) then I'd have to
wonder if you've ever seen optimizing compilers' output on other CISC
platforms, which is never that bad.
 
> Well, it has been argued over and over again, but it has been shown 
> that on CISC-based systems, decent Asm programmers can produce more 
> efficient and usually smaller code than a decent C or higher level 
> language's compiler can do. 

Yeah, it has been argued a lot, and even though some claim it has been
shown that assembly programmers are better, there are plenty of others who
claim that it's been shown to be the reverse.

However, the real problem is that there are no decent C compilers current
available to us.

More interesting, though, is the question I already asked above.  I would
like to know just how much better you think C code is on a CISC CPU?  
>From what you have been saying, it seems as if you are trying to suggest
it's several times larger, though I haven't seen any actual numbers
mentioned by you.

> It is not to say that C compilers haven't come a really long way, but
> the Z80-based TI calc is just not considered a viable C platform right
> now.

Just what are your criteria for "viability" anyway?  Is a programming
language considered not to be viable if a program that would be 6K in
assembly is 7.5K written with the compiler?

It is, of course, the case that it's not really a "viable" platform right
now, since we don't have a good compiler for it.  But since good compilers
exist for plenty of other platforms, there's no reason to think they can't
be done on the Z80 also.




References: