[net.micro.cpm] wanted: info on C compilers for CPM

rkj@ides.UUCP (Rick Janka) (01/10/86)

I need to write some software for an Amdahl X.25 Network Administrator
(4404E), which is an 8088-based micro used to control Amdahl PADs in an
X.25 network.  The micro runs CPM, and while we do have a Pascal compiler
available, I'd rather code in C.  

I've never shopped for a C compiler, and have only a vague idea of the
C compilers available that will run on CPM.  I'd certainly appreciate any
advice and information from anyone who has had experience with C compilers 
on a CPM system.

Rick Janka
AT&T Information Systems
(ihnp4,allegra,akgua)!abcom!cnmsrkj

Kushall.henr@XEROX.ARPA (01/13/86)

From: Bruce Eckel <morgan%fluke.uucp@BRL.ARPA>


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

jrv@MITRE-BEDFORD.ARPA (James R. Van Zandt) (01/15/86)

Here's another C compiler for CP/M.  It's the Small-C compiler which
appeared in Dr.  Dobbs #45 (May 1980), but modified by me to include
floating point.  The compiler requires a Z-80 processor and produces
Z-80 assembly language output.  There's a companion assembler and
linker.  You can get the whole package, including source code in C for
the compiler, as volume 156 from:

	C user's Group
	Box 97
	McPherson KS 67460
	(314) 241-1065

They charge $8 per volume and offer nearly any format.  If you want a
more detailed description, you can look at the September 1985 issue
of their newsletter.

I believe it's also available as SIG/M volume 224.

Credits: Small-C was written by Ron Cain.  The floating point routines
themselves were written by Niel Colvin.  The assembler and linker are
by Bruce Mallett.

(As you can tell, the C User's Group is not-for-profit.  I don't make
any money off this, either.) (I'm not maintaining this code, either. 
I've now moved on to the 16 bit world.)
                                        - Jim Van Zandt