[net.micro.pc] DR Large-Model C Compiler

ciaraldi@Rochester.ARPA (10/21/83)

From:  Mike Ciaraldi <ciaraldi@Rochester.ARPA>

For the past several months I have been using the Digital Research C
compiler. After some problems with the original release, it looks
pretty good.

This compiler only runs under CP/M-86 (DRI's version only, not the
older one distributed by IBM) or Concurrent CP/M-86, but a PC-DOS
version is coming.

You can compile in one of 4 memory models:

Small allows 64K of code, and 64K of combined static data (globals),
stack (local variables), and heap (alloc variables).

Compact allows 64K of code, 64K of stack, 64K static, and unlimited
heap. It uses 32-bit pointers for all data.

Medium allows unlimited code, and 64K total combined stack, static,
and heap. It uses 16-bit pointers for data, 32-bit subroutine calls.

Big allows unlimited code, unlimited heap, and 64K combined stack and
static (I think). It uses 32-bit pointers for both code and data.

Of course, these 32-bit pointers really turn into 20-bit addresses.

When you buy the C compiler (about $500), I believe the price includes
the Programmer's Utilities, which are the link editor, relocatable
assembler, and object-file librarian.

The compiler produces an extended version of Intel object files (not
the older HEX files). You specify the memory model at compile-time,
and something gets written into the .OBJ file to tell the linker which
library to use. You get four libraries, one for each model.

One idiosyncracy is that the .CMD file produced has undocumented
extensions that allow the segment fixup upon loading at runtime.  The
result is that, when you run a program that was compiled in the
compact, medium, or big mode, you cannot do it the regular way. e.g.
if it is FOO.CMD, you have to say

   R FOO

This runs R.CMD, which loads in FOO.CMD and does the fixup.  Small
model does not need this.  If you are running Concurrent (newest
version), you don't have to use the R.

I hope this is of help to people.

Mike Ciaraldi
ciaraldi@rochester