[comp.os.cpm] C-Compiler for CP/M-80 wanted

Ralf@adm.UUCP (01/23/87)

I'm looking for a C-Compiler that runs in the CP/M-80 environment.

Important features would be:

        - it MUST create 8080-object code (NOT Z-80), because my
          target machine uses an 8085 as central processor. How-
          ever, the compiler need not run under 8080, my development
          system has an Z-80 built in.

        - it must create ROMable code, that means: separate DATA and
          CODE segments.

        - code must be able to run standalone, without the CP/M en-
          vironment (I know I have to write my own startup module then
          and that I can't use most of the runtime library - but that's
          OK with me).

        - it should be interlinkable with assembly language routines,
          preferrable compatible with the RMAC-package.

        - it should be a commercial product. I tried SCC8080 and had
          no luck running it, I think there must be an error in the
          runtime code provided. As I'm not the one who has to pay
          for it, I don't want to fiddle around with an undocumented
          product.

Thanx for any information,

Ralf Bayer (The Care-Baer)
Computing Center @ the Technical University of Darmstadt, West Germany

Arpanet:   xbr1yd22%ddathd21.BITNET@wiscvm.wisc.EDU
BITNET:    xbr1yd22@ddathd21
-----------------------------------------------------------------------
                  > REAL programmers use FORTRAN <
-----------------------------------------------------------------------

Leisner.Henr@Xerox.COM (marty) (01/23/87)

Ralf --

Look at Manx Aztec C (advertised every month in all the major micro magazines).

I use it for the type of work you mentioned.

marty
leisner.henr@xerox.com

toma@enea.UUCP (01/27/87)

As far as I can remember, the c/80 from software toolworks can produce
ROMable code. It is a good compiler, and it definitely generates 8080
code.

When trying 8080 C-code in ROM remember to check the implementation of
the IN and OUT instructions. Since the 8080 has to take the port address
as the byte following the IN or OUT opcode, It really cant be done with
"pure" code. The trick is to reserve some space on the stack, write the
opcode and the parameter plus a ret here, and call your own stack. This
is at least how Whitesmits C does it.

Regarding the bug in SCC8080, it is there allright. I spent some futile
evenings with it before I gave up. I wish somebody else would have a go
at it and mail the result. I got this far:

In the file CRET.ASM (what a name for the startup code!) insert a push
of a parameter just before the call to Xarglist. Xarglist is a C routine
that expects a (char *) parameter. The pointer should point to Hex 80,
since this is where CP/M (CP/M 3.0 in my case) leaves the command line
arguments. So far so good, when I run SID, loads the c-program with SIDs
"I" and "R" commands, the compiler happily compiles anything.

Invoking it directly by "SCC8080 hello.c" from the CP/M prompt however,
produces nothing, the compiler simply ignores the parameters.

For further info contact me as toma@enea or

	                   Tony Mansson
				ENEA DATA Svenska AB
				ENEA SYD
				Box 4150
				S-203 12 MALMO
				SWEDEN

tuba@ur-tut.UUCP (01/30/87)

In article <3173@brl-adm.ARPA> Ralf Bayer writes:
>I'm looking for a C-Compiler that runs in the CP/M-80 environment.

I've just gotten delivery on the MIX C compiler for CP/M.  In several
respects it doesn't meet your needs...

	>it MUST create 8080-object code (NOT Z-80)
nope

	it must create ROMable code, separate DATA and CODE segments.
maybe

	>code must be able to run standalone, without the CP/M environment
no, or at least, not as such

	>it should be interlinkable with assembly language routines,
	>          preferrable compatible with the RMAC-package.
maybe, asm() calls are certainly there

...but I'm happy with it in almost all other respects.  It is a
commercial product, that runs right out of the box without apologies
or compromises.  It supports a number of function libraries for bdos
and bios calls; there's also an ms-dos version, so there are functions
for each.  It supports a FULL Kernighan and Ritchie C.  Compiles are
slow and it generates (to date) unimpressive code.  But it supports
everything: all data types, structures, assignments to structures,
enumeration, the works.  Comes with a few useful tools -- object code
speed or space optimizing, bin-to-ascii conversion.  Supports i/o
redirection from command line.

All in all a good buy at $40, everything works *so far*, and I can
recommend it as a user.  I have no relation with the company other
than as a satisfied customer.  MIX may be called at 1-800-523-9520, or
you can mail your check to 2116 East Arataho, Suite 363, Richardson
TX, 75081.

					-- jon
-- 
Jon Krueger   Department of Necessary Evil   University of Rochester
uucp: {seismo, allegra, decvax}!rochester!ur-tut!tuba   BITNET: TUBA@UORDBV