There are 24 messages in this thread.
You are currently looking at messages 20 to 24.
Philipp Klaus Krause wrote: > I want to look at alternatives to C for Z80 programming. > Since there's probably nothing that directly compiles to Z80 asm I want > to look at languages that compile to C. There were many different compilers for Z80 for ZX Spectrum. Also, there used to be quite a lot of stuff for the CP/M 80 OS. The CP/M stuff was intended for i8080, however it is upwards compatible with Z80. I can recall the different versions of C, Pascal, Forth, Fortran, many dialects of Basic. However, the above mentioned compilers were not the cross compilers. I.e. you have to run them on the real Z80 system or in Z80 simulator on PC. > There are the fopllowing > requirements: > > - Compiles to C > - Free compiler > - Low memory usage (I have only 1KB of RAM) > > Has anyone come across such a language? > The last requirement seems to be a rather hard one. One KB just for the variable data is not a problem. However, it would be difficult to fit a meaningful application with the code and the runtime libraries into the total memory footprint of 1KB. > 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 badly documented and a pain to build. It seems > the authors just see it as a tool for development of Coyotos, their > embedded OS, not as a generic programming language someone else might > want to use. I wounder why would you need that in our days. Vladimir Vassilevsky DSP and Mixed Signal Design Consultant http://www.abvolt.com
On Jul 14, 10:47=A0am, David Brown <da...@westcontrol.removethisbit.com> wrote: > Pascal has some advantages, but they are more along the lines of things > it does *not* support or allow. =A0You have to use modules properly in > Pascal, and can't make spaghetti with headers and macro definitions that > change according to where the header is used. =A0You can't randomly mix > integers and enumerated types. =A0You can't use functions or data without > declarations. =A0You can't mix up "=3D" and "=3D=3D", or omit "break" sta= tements > in switches, or many of the other syntactically legal and semantically > nonsense constructs that are allowed in C. =A0There are a few other > features such as nested functions that don't exist in C (although gcc > allows nested functions as an extension), and simple set types. Well put.
Philipp Klaus Krause wrote: > I started programming ColecoVision games as a hobby some years ago. Back > then everyone used either asm or C with HITECH-C 3.09 in a CP/M emulator. > I wrote a library and tools > (http://www.colecovision.eu/ColecoVision/development/) for use with > sdcc, so I could use a more modern C compiler. I started improving sdcc > and became it's Z80 port maintainer. Nice! I've got an interest in all things retro-gaming related. The only brush with the Colecovision I've had is porting the FPGA implementation from fpgaarcade.com to my hardware. FYI IIRC the FPGA implementation has an enhanced graphics mode not on the original hardware! I've used SDCC for the Cypress EZUSB-FX (8051) port. Don't bother with Pascal - IMHO it's like programming in C, only with one hand tied behind your back. Regards, -- Mark McDougall, Engineer Virtual Logic Pty Ltd, <http://www.vl.com.au> 21-25 King St, Rockdale, 2216 Ph: +612-9599-3255 Fax: +612-9599-3266
>I want to look at alternatives to C for Z80 programming. >Since there's probably nothing that directly compiles to Z80 asm I want >to look at languages that compile to C. There are the fopllowing >requirements: > >- Compiles to C >- Free compiler >- Low memory usage (I have only 1KB of RAM) > >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 badly documented and a pain to build. It seems >the authors just see it as a tool for development of Coyotos, their >embedded OS, not as a generic programming language someone else might >want to use. > >Philipp > Use C. Check out SDCC. http://sdcc.sourceforge.net/ Jeff http://www.e2atechnology.com