<< Previous Message Main Index Next Message >>
<< Previous Message in Thread This Month Next Message in Thread >>
Date   : Mon, 08 Jul 1985 20:45:06 GMT
From   : Bruce Eckel <morgan%fluke.uucp@BRL.ARPA>
Subject: C compilers for CP/M

>I am planning on buying a C compiler to run on my CP/M system.  What I
>would like to know is which one should I buy?  Things that I would like
>to do are:
>   * Write interrupt handlers.
>   * Produce 'com'able code
>   * Mixed language programming
>Would anybody with C compilers on their machines care to relate their
>experiences?  All responses will be greatly appreciated.
>
>                                   Mark Ryding
>                                   {..trwrb!trwrba!ryding}

I have used several C compilers on CP/M and have tried most of the
things you refer to.  All of them produce "com"able code, if you mean
produces a .com file.  I also think all of them require you to go through
and assembler, linker and loader to accomplish this.  If you mean "rom"able,
I know Aztec does it and I think the others will too if you put in the right
ORG statements or whatnot.  There is usually a way even if they didn't design
it in.

1) Aztec.  Expensive at $200, but K&R complete, or more so than most.  Good
library.  Includes its own assembler, linker and librarian.  Slow as mollasses.
I use it because I am familiar with it and didn't want to mess with the
idiosyncrasies of the others (at the time).  No bit fields or preprocessor
macros, but it seems NOBODY has those.  The manual is geared after UNIX (not
a terribly good precedent but OK) which I am sure they developed the language
on.  One of the big plusses about this system is its transportability -- Aztec
makes (virtually) identical compilers for essentially every processor and
operating system.  They even make cross-compilers so you can (for example)
develop on cp/m and run on apple.

2) BDS .  A friend swears by it and it seems fast, efficient and correct.
That is, the compiler seems fast.  I don't know that much about the code
efficiency but he says it is efficient.  $150.  The manual is very good.
No library is as complete as Aztecs, but you can always add your own
library modules to any of these.  BDS was really the CPM C standard
for quite a while, before:

3) C/80 .  for 50$ (might be 60 now) and 20 extra for floating point, the real
bargain in C compilers.  I used an early version of this and didn't like it
because they didn't seem to conform to K&R (at least not the library functions)
and as I was struggling to *learn* the language in the first place, I didn't
want to mess with language variants.  Now, however, it seems to have been
cleaned up significantly.  People seem to love it only second to Turbo pascal,
and amazing things have been written with it.  The people at Software
Toolworks (makers of C/80) have written a lot of stuff with it themselves,
notably MyCalc (best spreadsheet for cpm I have seen; I am told supercalc does
sorts better, but I just like the way MyCalc works.  Amazing that visicalc
made any money at all, considering how limited it was) and Mychess.  Lots of
other people use C/80.  Real nice to have floating point; I think it
comes with Aztec but you might have to pay extra for it.  C/80 is probably
your best bet (at least to get started).

4) Q/C.  The only thing I can say about this is it comes with source code,
written in C.  I don't know how it runs since I've never used it, but if 
you want to know how a compiler is written, this would probably be $95
well spent.  Chances are it is real slow (whereas BDS and C/80 are
written, I believe, in assembly).

What do I prefer?  Well, they all do so many disk accesses, and of
course going in and out of the editor (wordstar) is incredibly time
consuming.  I get very frustrated and am thinking of putting a RAM disk
on my Kaypro with a megabyte (~$450) to speed up *everything*.  But it seems
such a waste for most tasks, which are fast.  I keep hearing rumors about:

5) Turbo C.  Vaporware at the moment, but if it is anything like Turbo P,
it will be worth waiting for.  They may have put all their efforts 
into Modula-2, but we can hope.  I would by Turbo C in a second, and
be off and running.  Failing that, I may just give up the wait and
buy Turbo Pascal.

                       Bruce Eckel <morgan>
                       uw-beaver!fluke!morgan
<< Previous Message Main Index Next Message >>
<< Previous Message in Thread This Month Next Message in Thread >>