News:

Printed Amstrad Addict magazine announced, check it out here!

Main Menu

C compilers that run on the CPC?

Started by sno0ks, 17:50, 22 July 18

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

sno0ks


I have used z88dk, but for pure s**ts and giggles I want to go full native. What was/is the best one out there and what's the best way of getting it?


Regards!

GUNHED

Well, I would suggest the Small C compiler for CP/M Plus.  :)
http://futureos.de --> Get the revolutionary FutureOS (Update: 2023.11.30)
http://futureos.cpc-live.com/files/LambdaSpeak_RSX_by_TFM.zip --> Get the RSX-ROM for LambdaSpeak :-) (Updated: 2021.12.26)

sno0ks


Thanks for the reply! I hadn't thought of using CP/M but unfortunately I can't seem to find download links to either CP/M for Amstrad or a binary of the Small C compiler that would run on it.


Are they somewhere so obvious I can't find them?

asertus

Some of these may work,


http://www.z80.eu/c-compiler.html


For small tests I have used http://www.cpcwiki.eu/index.php/HiSoft_C , but I prefer compiling in a PC, easier to edit and faster to compile.

HAL6128

You will find the sources / discs at cpc-power.com.

HiSoft C (DOS and CP/M) and Arnor C (CP/M) are both (almost) ANSI C Compiler.
...proudly supported Schnapps Demo, Pentomino and NQ-Music-Disc with GFX

AMSDOS

PhrozenC is an interesting one to check out. It's basically a Small-C compiler, so would be somewhat limited, though PhrozenC comes on ROM or Disk, programs are written using Protext, PhrozenC compiles the code into Assembly (which can be compiled in MAXAM). PhrozenC also uses the Extra 64k (so 128kb is required), for storing the program to compile. Unsure if it's limited to what system it compiles to unlike Small-C which can compile AMSDOS,CP/M or FutureOS programs, PhrozenC is one of the more recent C Compilers made for CPC in 2010, comes with Manual and is Public Domain, it doesn't require CP/M to be running either. On a standard CPC it would seem to require a few ROMs to get the job done, for emulator like Winape, I'm sure editing the program in Windows and copy and paste the text file onto a DSK should work.
* Using the old Amstrad Languages :D   * with the Firmware :P
* I also like to problem solve code in BASIC :)   * And type-in Type-Ins! :D

Home Computing Weekly Programs
Popular Computing Weekly Programs
Your Computer Programs
Updated Other Program Links on Profile Page (Update April 16/15 phew!)
Programs for Turbo Pascal 3

sno0ks


Thanks everybody for all the very helpful replies, I think that gives me enough to chew on for the next while! I have Hisoft_C up and running so I'll take it from there, manual first.  :)







Sykobee (Briggsy)

I presume the CP/M C compilers will generate 8080 code, rather than taking advantage of the additions in Z80?

GUNHED

No, not Arnor C, not Small C and not Aztec C. They all make Z80 code. CP/M allows to use the full register set of the Z80, which can't be done for the native CPC OS. So I suggest to move to CP/M Plus which also provides 61 KB free RAM (in contrast to 42 KB under the native OS).
http://futureos.de --> Get the revolutionary FutureOS (Update: 2023.11.30)
http://futureos.cpc-live.com/files/LambdaSpeak_RSX_by_TFM.zip --> Get the RSX-ROM for LambdaSpeak :-) (Updated: 2021.12.26)

AMSDOS

The original Small-C Compiler by Ron Cain was written to target 8080 systems, though at some stage it's been modified for z80 systems. Ron Cain's Small-C Compiler is also Public Domain, though the James Hendrix's versions are Shareware. A few years ago I was using Small-C along with Juergen Weber's Library which has Z80 code in it along with another similiar Library written earlier for Amstrad systems, to make some graphical demos. Downloading Small-C from an Amstrad based site should give you the right program, the Small-C page which is on the Wiki has links to some CP/M websites, which maybe the 8080 version. If in doubt just download ProzenC which is the modernised Small-C made to benefit what you can get out of the Amstrad with 128Kb, it's probably only limited for compiling CPC-OS programs through.
* Using the old Amstrad Languages :D   * with the Firmware :P
* I also like to problem solve code in BASIC :)   * And type-in Type-Ins! :D

Home Computing Weekly Programs
Popular Computing Weekly Programs
Your Computer Programs
Updated Other Program Links on Profile Page (Update April 16/15 phew!)
Programs for Turbo Pascal 3

Powered by SMFPacks Menu Editor Mod