[comp.sys.ibm.pc] MIX Power C compiler

svirsky@ttidca.TTI.COM (William Svirsky) (08/04/88)

I have had the Power C compiler for about 7 months now and have played
around with it enough to be able to share some opinions about it.  First
let me say that I have no ties with MIX except as a satisfied customer. 
    
I'm extremely pleased with both the compiler and the company.  This is a
very complete compiler with a large library of functions, including many
graphics functions - it does in fact seem to be a superset of Turbo C
and Microsoft C at least in this regard.  The compiler comes with a
combined C tutorial, compiler/linker user's guide, and library reference
manual of 663 pages in softcover form.  Since I don't need a tutorial in
C, I just skimmed through that part, but it seemed fairly complete and
did have plenty of examples.  The compiler/linker user's guide is a
little too brief in some information, such as interfacing to assembly
language, and explanations of some error messages, but, for the most
part, it does tell you what you need to know.  The library reference
also has a few errors, but other than that is very good.  Every function
has an example of its use.  Not just a piece of code, but a complete,
although simple, program.  In fact, the example for the keep function,
which is used to make a C program terminate and stay resident, is a TSR
that displays and updates a clock in the upper-right part of the
display.

While I have not rigorously tested it for ANSI compatibility, it does
seem to support most of the proposed ANSI standard. 

I've compiled over 10,000 lines of code, most of which came over Usenet,
with the Power C compiler and, with a few exceptions, had no problems. 
Most problems I have had are Unix/MSDOS or C compiler incompatibilities.
There were a few bugs in the earlier versions of the compiler, but the
version I have now, 1.1.2, has so far been bug free.  Also, with one
exception, the upgraded versions of the compiler I received were free.

The compiler can be run comfortably on a 2 floppy system.  MIX specifies
MS/PCDOS 2.0 or later 256K and 2 floppy drives as a minimum
configuration.

The compiler supports only what MIX calls an "enhanced medium model". 
What this means is that they take the standard medium model (unlimited
code/64K data) and add an unlimited size heap.  I haven't had a chance
to play with this aspect of the compiler at all.

MIX calls this an optimizing compiler, but I don't know how much
optimization it does.  Without doing any formal benchmarks, I have
compiled a few small utilities in Power C, Turbo C, and Microsoft C 4.0
and sometimes Power C executes faster and sometimes not.  A few
magazines have benchmarked the Power C compiler, among others, and their
results seem to bear me out.

Power C is not object file compatible with Microsoft's .obj format. 
Instead it generates .mix object files.  It does however, have a utility
that is supposed to convert .obj files into .mix files.  I haven't tried
this yet.

I spent an extra $10 and got the library source.  I was pleasantly
suprised when I found that the source also comes with their assembler
and library utility, although the documentation on both is skimpy. 

I also bought the Power C debugger, Trace.  I haven't used it
extensively but, so far, it's very good.  It supports C source level
debugging, assembly level debugging, simple profiling, unlimited break
points, watchpoints, single step, animated trace execution, full speed
execution, output to a virtual screen, multiple windows, etc.  The only
deficiencies I've noticed so far is that you can't alter the sequence of
execution in either the C or assembly code, you can't change the
contents of the registers, and you can't change the assembly code. 
There may be ways to do these, but I haven't read the Trace manual cover
to cover yet and haven't yet called MIX tech support.

MIX's technical support is very good.  I did need to call them about a
few problems and was usually able to get through on the 1st try.  They
were very helpful and, in the case of 1 bug, the support person, as I
was speaking to him, entered at his PC the short test program I used to
isolate the bug, and verified the problem.  He also wrote down my name
and address and a week later I received 4 new diskettes (2 compiler, 2
library source) with the latest version of the compiler and library
source at no charge.

BTW, MIX now has a 60 day money back guarantee.

This is one of those rare times when I think I got more than my money's
worth. 

Price list:
Power C compiler				$19.95
Library source, library utility, and assembler	$10
Power C Trace debugger				$19.95 (I think)


MIX Software
1132 Commerce Dr.
Richardson, TX 75081
1-800-333-0330
-- 
Bill Svirsky, Citicorp+TTI, 3100 Ocean Park Blvd., Santa Monica, CA 90405
Work phone: 213-450-9111 x2597
svirsky@ttidca.tti.com | ...!{csun,psivax,rdlvax,retix}!ttidca!svirsky

Ralf.Brown@B.GP.CS.CMU.EDU (08/07/88)

In article <3018@ttidca.TTI.COM>, svirsky@ttidca.TTI.COM (William Svirsky) writes:
}The compiler supports only what MIX calls an "enhanced medium model". 
}What this means is that they take the standard medium model (unlimited
}code/64K data) and add an unlimited size heap.  I haven't had a chance
}to play with this aspect of the compiler at all.

Sounds like what TurboC and probably everybody else calls "large model".  The
large model uses unlimited code/64K global data/unlimited heap (all pointers
are 32-bits, but global data is accessed relative to DS for faster/smaller
code).  "Huge model" uses one 64K global data segment per source file, but
this imposes extra overhead in loading DS on EVERY function entry.

If MIX really has added an unlimited heap to the standard medium model, how
can the compiler tell whether to use 16-bit pointers (for the 64K data
segment) or 32-bit pointers (for the heap)?
--
UUCP: {ucbvax,harvard}!cs.cmu.edu!ralf -=-=-=- Voice: (412) 268-3053 (school)
ARPA: ralf@cs.cmu.edu  BIT: ralf%cs.cmu.edu@CMUCCVMA  FIDO: Ralf Brown 1:129/31
Disclaimer? I     |Ducharm's Axiom:  If you view your problem closely enough
claimed something?|   you will recognize yourself as part of the problem.

svirsky@ttidca.TTI.COM (William Svirsky) (08/12/88)

In article <22fc46fd@ralf> Ralf.Brown@B.GP.CS.CMU.EDU writes:
}In article <3018@ttidca.TTI.COM>, I wrote:
}}The compiler supports only what MIX calls an "enhanced medium model". 
}}What this means is that they take the standard medium model (unlimited
}}code/64K data) and add an unlimited size heap.
}
}Sounds like what TurboC and probably everybody else calls "large model".  The
}large model uses unlimited code/64K global data/unlimited heap (all pointers
}are 32-bits, but global data is accessed relative to DS for faster/smaller
}code).  "Huge model" uses one 64K global data segment per source file, but
}this imposes extra overhead in loading DS on EVERY function entry.
}
}If MIX really has added an unlimited heap to the standard medium model, how
}can the compiler tell whether to use 16-bit pointers (for the 64K data
}segment) or 32-bit pointers (for the heap)?
}--

You explicitly tell it so.  In MIX Power C all data pointers are, by
default, 16 bits.  Power C supplies a set of functions to access the
heap, such as:
   void far *farmalloc(unsigned long);
   char far *farstrcpy(char far *, char far *);
etc.

To access the heap you must use these functions and declare your
pointers as far.  Not as easy or transparent as large model, but more
efficient, I would think, unless you are doing a great deal of heap
access.

Most, if not all, of the memory allocation and string handling functions
are represented.
-- 
Bill Svirsky, Citicorp+TTI, 3100 Ocean Park Blvd., Santa Monica, CA 90405
Work phone: 213-450-9111 x2597
svirsky@ttidca.tti.com | ...!{csun,psivax,rdlvax,retix}!ttidca!svirsky

ralf@b.gp.cs.cmu.edu (Ralf Brown) (08/14/88)

In article <3040@ttidca.TTI.COM> svirsky@ttidcc.tti.com (William Svirsky) writes:
}In article <22fc46fd@ralf>, I wrote:
}}If MIX really has added an unlimited heap to the standard medium model, how
}}can the compiler tell whether to use 16-bit pointers (for the 64K data
}}segment) or 32-bit pointers (for the heap)?
}}--
}
}You explicitly tell it so.  In MIX Power C all data pointers are, by
}default, 16 bits.  Power C supplies a set of functions to access the
}heap, such as:
}   void far *farmalloc(unsigned long);
}   char far *farstrcpy(char far *, char far *);

Oh, mixed memory models!  I use far pointers from small model fairly 
frequently.

-- 
{harvard,uunet,ucbvax}!b.gp.cs.cmu.edu!ralf -=-=- AT&T: (412)268-3053 (school) 
ARPA: RALF@B.GP.CS.CMU.EDU |"Tolerance means excusing the mistakes others make.
FIDO: Ralf Brown at 129/31 | Tact means not noticing them." --Arthur Schnitzler
BITnet: RALF%B.GP.CS.CMU.EDU@CMUCCVMA -=-=- DISCLAIMER? I claimed something?