From: Niklas Holsti on
Jon Kirwan wrote:
> On Mon, 11 Jan 2010 15:21:02 +0100, Philipp Klaus Krause
> wrote:
>
>> I asked this question here about one and a half years ago. I'm posting
>> again since I'm curious about the current situation.
>>
>> I want to look at alternatives to C for Z80 programming using languages
>> that compile to C. There are the following requirements:
>>
>> - Compiles to C
>> - Free compiler
>> - Low memory usage (I have only 1KB of RAM, 32KB of ROM)
>>
>> Has anyone come across such a language?
>>
>
> And GNU compiler front ends exist, as well. Even for ADA, I
> believe.

The GNU Ada compiler, GNAT. See http://libre.adacore.com/libre/. There
is a GNAT version targeting 8-bit AVRs, but not the Z80, I believe. A
free version of the AVR Ada compiler is at
http://avr-ada.sourceforge.net/, but I think it supports a subset of
Ada, not the full language.

There is also an Ada-to-C compiler, see
http://www.sofcheck.com/products/adamagic.html#adamagic, but it is not free.

--
Niklas Holsti
Tidorum Ltd
niklas holsti tidorum fi
. @ .
From: Philipp Klaus Krause on
Jon Kirwan schrieb:
>
> I'm not sure what you are _really_ trying to find. C++ used
> to be translated to c with something called cfront. Up until
> version 4, when growing exception handling requirements
> finally forced a transition to true c++ compilation to object
> code. cfront is largely dead, now. But that doesn't mean it
> wouldn't still be an option. It did a great job for what it
> did. Of course, I have no way to know if it meets your
> needs.
>
> [...]
>
> Could you talk about _exactly_ what you feel you need here,
> and why?

I want to write programs for a Z80-based system where 32K of RAM and 32
K of ROM are available, developing on and cross-compiling on a GNU/Linux
system.
So far I've used the sdcc compiler for this. Now I'm looking for
something that compiles to C; the output would then be fed into sdcc
again. I would like to be able to use the C libraries I have written for
this system before.
My goal is both to try a new language (I know C, but would like to have
a look at other programming styles, maybe OO or functional) and see how
sdcc handles the resulting C code.

Unfortunately AFAIK, no one has managed to build cfront on a modern
system (googling e.g. for cfront linux doesn't return any encouraging
results).

Philipp
From: Philipp Klaus Krause on
-jg schrieb:
> On Jan 12, 11:07 am, Grant Edwards
>> I think we've got a pretty good clue that it won't meet his needs: 1KB RAM and 32KB of ROM. :)
>
> After an initial ?!?, I took that to mean a rough application
> footprint, NOT the actual compiler resource needed.
> The OP does need to provide more info..
>
> -jg
>

I intend to develop on a modern GNU/Linux system, and use the sdcc
cross-compiler to generate binaries for the Z80 system from C.

Philipp
From: Jon Kirwan on
On Tue, 12 Jan 2010 09:36:18 +0100, Philipp Klaus Krause
wrote:

>Jon Kirwan schrieb:
>>
>> I'm not sure what you are _really_ trying to find. C++ used
>> to be translated to c with something called cfront. Up until
>> version 4, when growing exception handling requirements
>> finally forced a transition to true c++ compilation to object
>> code. cfront is largely dead, now. But that doesn't mean it
>> wouldn't still be an option. It did a great job for what it
>> did. Of course, I have no way to know if it meets your
>> needs.
>>
>> [...]
>>
>> Could you talk about _exactly_ what you feel you need here,
>> and why?
>
>I want to write programs for a Z80-based system where 32K of RAM and 32
>K of ROM are available, developing on and cross-compiling on a GNU/Linux
>system.
>So far I've used the sdcc compiler for this. Now I'm looking for
>something that compiles to C; the output would then be fed into sdcc
>again. I would like to be able to use the C libraries I have written for
>this system before.
>My goal is both to try a new language (I know C, but would like to have
>a look at other programming styles, maybe OO or functional) and see how
>sdcc handles the resulting C code.
>
>Unfortunately AFAIK, no one has managed to build cfront on a modern
>system (googling e.g. for cfront linux doesn't return any encouraging
>results).

Hopefully, someone "in the know" on cfront implementations
will say something, then. It definitely was a "product" for
a while. I'd hope, but can only hope for now, that those who
worked on it and the company that paid for that time and
effort and owns the result (AT&T?) has made it available in
some fashion so that it can continue. It's possible,
however, that it has been deep-sixed in order to make
absolutely sure that a separate development path didn't
interfere with c++'s "intended" track. So maybe it does NOT
exist in a usable form, anymore. I'd be a bit sad about
that, if so.

Jon
From: Philipp Klaus Krause on
Tim Wescott schrieb:
>
> At the risk of starting a flame war -- what's the matter with C?

It's C. It's the language I use most and know best, but I think it would
be good to try something different, have a look at other programming
langauages and how things are done in those langauages even if in the
end C will probably remain the language I use most.

Philipp
First  |  Prev  |  Next  |  Last
Pages: 1 2 3 4 5 6 7 8 9 10
Prev: USB drives, caching and sync
Next: Which CPU to choose?