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]




Steve:
>but c is being used by some, using c has nothing to do with what platform it
>is on...im sure that many systems that use a z80 or like processor use it,
>in fact i know of a few... the gameboy uses a workalike z80 with only a
>couple operations added and taken out (by the way there have been a few
>games commercially made that make use of c for it, ill give ya some bonus
>points if you can name which ones) and also the genesis used the z80 for its
>sound and im sure that some developers used at least a little c every now
>and then for that. so if you research what I just said then you'd understand
>that a c language can be used on any system that anyone wants to use it for,
>basically all thats holding them back is having the right tools to do it. i
>could easily say that c wont work on a 68k processor if there werent any
>good c tools for it right?

Now your confusing the point. The difference between a viable use and 
possible are two different things. Plus the fact we aren't referring 
to the Gameboy or a Z80-based sound control unit. Nintendo added a 
special GPU that meant less cycles on the Z80 would be wasted for 
graphics, and dumping it onto the GPU, speeding up the code, not to 
mention you don't have a makeshift OS locking down 32k of RAM, and 
only 8k is useful for your program, and one of the shiftable 16k 
blocks is needed for all your calls to the OS. This leaves you with a 
grand total of 24k in the 86's case. NOT enough for an extensive C 
program. Gameboy is perfect for small-end gaming, and can use C, 
since all the code is stored on a ROM chip, which has been known to 
size in at around 1MB+ on CGB carts. Plus the RAM available on the GB 
unit itself, this means that a C program has PLENTY of room. Also, 
sound control is really just a BIOS that runs on the chip. I could 
easily go out and use a PIC microcontroller with a handmade C 
compiler to get the same result. There is overhead associated with 
any system, and if you use C to write that system, you only have to 
worry about your own code, rather than a system written by someone 
else as well.

Patrick:
>Also unclear why 24K is too little runtime space for C, but sufficient for
>assembly.  Remember that 'runtime space' includes not only code, but
>permanent data such as text and graphics, and temporary data such as
>screen buffers, which are no larger in C than in assembly.
>
>In reality, the only way that space limitations would be a problem for C
>only is if C code were much larger than the assembly equivalent.  That is
>the case right now, but only because the current compilers we have are not
>very good (that's also why current C code on the Z80 is very slow).
>
>Of course, there's no reason to think that C compilers always generate
>poor code.  The TI-GCC compiler on the 68K shows clearly that compilers
>can generate code which is both small and fast.  While the 68K does have a
>larger addressable memory space than the Z80, that's not very relevant
>here.  The larger memory use of 68K programs is mostly due to having a
>larger screen, and thus larger image buffers and images.  C code on the
>  68K aren't that much larger than assembly equivalents.

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. 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. If someone were to make a 
C/Asm hybrid compiler that didn't HAVE to do all that much 
optimizing, and spend very little time for optimizing... it would get 
my vote... Hell, if I get the time, I will take my CORE compiler that 
I never finished and convert it into something that can create Z80 
code.

-Krev
-- 
----
"Science describes how our universe reacts in a mathematical 
representation of it, but can be described in regular terms. These 
terms seem to infringe on Religion's role of describing the creation, 
and once Science finds a clue to the creation, Religion declares 
Science a heretic. Religion scolds Science, telling it to stick to 
doing what it does best. To this, Science laughs and complies, going 
after the creation once again. Wouldn't it be fair to listen to the 
fact that these humans could have been a product of the Creator just 
as we are, Borak?" - Cyander, Day for the Xenith: Xenith Dawn 

__________________________________________________
Do You Yahoo!?
Talk to your friends online with Yahoo! Messenger.
http://im.yahoo.com



Follow-Ups: References: