Prev: USB drives, caching and sync
Next: Which CPU to choose?
From: Chris Burrows on 12 Jan 2010 21:07 "Philipp Klaus Krause" <pkk(a)spth.de> wrote in message news:4b4b33cf$0$9752$6e1ede2f(a)read.cnntp.org... > > 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? > There are a couple of Oberon to C compilers in existence. e.g. Ofront. 1. It compiles to C 2. It is free for non-commercial use 3. There aren't too many practical high-level languages that are more compact than Oberon. Versions are available for Linux and Windows: http://www.software-templ.com/shareware.html If that doesn't meet your requirements if I were you I'd follow others' recommendations and: a) switch from the Z80 to an ARM processor b) forget about using C as an intermediate language -- Chris Burrows CFB Software Armaide: ARM Oberon-07 Development System http://www.armaide.com
From: Ed Prochak on 12 Jan 2010 23:35 On Jan 12, 4:43 am, Philipp Klaus Krause <p...(a)spth.de> wrote: > 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 Then may I be so bold as to suggest: You may be going about this the wrong way. Go ahead and learn some of those other languages on your development platform. There are awide variety of compilers for LINUX. Once you decide on one you like and that seems to fit your target platform (Z80) needs, then write the compiler yourself. Trust me, if you really want to learn programming techniques, writing a compiler will teach you a LOT. HTH, ed
From: Philipp Klaus Krause on 13 Jan 2010 03:48 Stephen Pelc schrieb: > On Tue, 12 Jan 2010 17:15:18 +0100, Philipp Klaus Krause <pkk(a)spth.de> > wrote: > >> I'm not looking for a C compiler. There already is sdcc targeting the >> Z80, which seems perfect for me. I want to try different languages, >> which should compile to C (so I can send the resulting C code into sdcc). > > Do you have any objection to compilers which generate binary directly? > If you have a link map from SDCC it is usually quite simple to provide > an interface to the C libraries, providing that you know the start up > mechanism of the C system. Well, another motivation for wanting languages that compile to C is that I want to see how well sdcc handles automatically generated code. I.e. it could help discover sdcc bugs and improve sdcc's quality. In the past this has already been the case with nesC (a programming language to be used with TinyOS for wireless sensor networks that compiles to C). Philipp
From: Philipp Klaus Krause on 14 Jan 2010 06:52 Doug McIntyre schrieb: > don <don> writes: >> Doug McIntyre wrote: >>> You'd probably easily find a few dozen modern languages that compile >>> to C as output. >>> >>> There are many out there that compile to C. > >> Please, no offense, but do you have any links ?? > > > The two projects I referenced are going to be the biggest places. > http://www.antlr.org/ > http://llvm.org/ > > There will be many front ends on these platforms, utilizing their > C backend output engines, look through the various projects built on > these platforms. Unfortunately some projects using llvm seem to have no support for the C backend (I just looked at the ldc D compiler so far). Philipp
From: 42Bastian Schick on 14 Jan 2010 08:31
On Mon, 11 Jan 2010 15:21:02 +0100, Philipp Klaus Krause <pkk(a)spth.de> 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? > >The last requirement seems to be a rather hard one. Many languages that >compile to C include relatively large overhead or do dynamic allocation >of memory, etc. So far bitc (http://bitc-lang.org/) seems to be the >closest match, but it's abandoned. 10 years ago, oops 15 years ago, we had something called Mocca (IIRC) at university which compiled Modula-2 to C, but so far I did not find it on the internet. -- 42Bastian Do not email to bastian42(a)yahoo.com, it's a spam-only account :-) Use <same-name>@monlynx.de instead ! |