Page 1 of 1

C compiler

Posted: 18 Apr 2021 13:03
by Lardo Boffin
Hi all

Having decided to learn C I figured it would be a good use of my new 512, otherwise I will just end up playing a few games and then it will end up in a cupboard.

I’m looking for a C compiler for CP/M for my 512 with a REMEMorizer (the 80 by 48 column display is awesome!). Ideally it needs to have some libraries for text and graphics functions.

Up until recently I have been doing this on my Tatung Einstein using HiSoft C which does have a Tatung library - it includes changing screen mode, text at ‘X,Y’, like drawing and sprites etc. Unfortunately the Ctrl key on my Einstein is playing up (and this is used a LOT in CP/M) and it takes up a huge amount of space on my desk!

Any help appreciated thanks.

Re: C compiler

Posted: 18 Apr 2021 13:30
by Dave
You can find a couple of "C" compilers in the disks from the MTX Germany User Club

http://primrosebank.net/computers/cpm/cpm_uc_de.htm

Small C is on disk 28

You'll need to use something like Andy's cpmcbfs to get the files onto your REMEMORizer SD card

Re: C compiler

Posted: 18 Apr 2021 22:15
by Lardo Boffin
Thanks Dave. I am waiting on getting my laptop back then I will download this.

Re: C compiler

Posted: 30 Apr 2021 19:56
by Lardo Boffin
Looks like I am up and running!

16FFECC2-D97C-45B8-BD29-881D26F522B8.jpeg
16FFECC2-D97C-45B8-BD29-881D26F522B8.jpeg (1.48 MiB) Viewed 8904 times

Am using a copy of Hisoft C as I didn’t find any instructions (in English) for Small C and never used it before.

Re: C compiler

Posted: 30 Apr 2021 20:17
by Lardo Boffin
Next stop trying to figure out the MTX specific stuff like changing mode, putting text at X,Y and graphics etc.

Re: C compiler

Posted: 30 Apr 2021 23:17
by Martin A
The FDX 80 column screen drive expects an offset of 32, on the line, point and cursor positioning. Presumably done to keep them from being mistaken for control codes.

So printing 0x03, 0x20, 0x20 is the equivalent of CSR 0,0 in BASIC.

The full list is inthe FDX technical manual.

Re: C compiler

Posted: 30 Apr 2021 23:33
by Lardo Boffin
Martin A wrote: 30 Apr 2021 23:17 The FDX 80 column screen drive expects an offset of 32, on the line, point and cursor positioning. Presumably done to keep them from being mistaken for control codes.

So printing 0x03, 0x20, 0x20 is the equivalent of CSR 0,0 in BASIC.

The full list is inthe FDX technical manual.
Thanks.

Re: C compiler

Posted: 08 Mar 2022 00:07
by Crazyboss
Now a days i guess developers use the sdcc compiler, i was told it was quite optimized, and i know people in the ColecoVision world use to make new games for that system.