[alt.msdos.programmer] MIX PowerC 2.0

svirsky@ttidcc.tti.com (Bill Svirsky) (03/29/90)

I have no ties to MIX except as a satisfied customer.

The good news:

- Now supports small, medium, large models, and huge data. See below for
more details.
- Price is still only $19.95. Existing owners can upgrade for $5.
- New CTrace to support new models is still only $19.95. Existing CTrace
will still work, but in medium model only. Owners can upgrade for $5.

The bad news:

- Still outputs proprietary .MIX object modules. MIX utility to convert
Microsoft .OBJ files is still included and is supposed to be improved.

Comments:

I've used the Power C compiler for about 2 years now and am extremely
happy with it and with MIX. For a shareware price (actually less than a
lot of shareware), I get a commercial quality product. Support is very
good. I've gotten free upgrades from them in the past when I reported
bugs and they say that this is still their policy.

Strictly as a C compiler, I rate it as good as Turbo C and Microsoft C.
I've run over 10,000 lines of code, mostly from the net *.sources
groups, through the compiler with _very_ few problems. Although I
haven't actually counted all of them, I believe it's function library
is a superset of both TC and MSC. From my experience, it's as ANSI
compliant as TC and MSC. It supports interrupt functions and has other
support functions for writing TSRs. In fact, the example for the "keep"
function is a TSR that displays the time in the upper right-hand corner
of the screen.

If you're learning C, I rate it as better, since the manual (650+
pages) contains a tutorial at the front and every function in the
reference section has a sample program.

The library source is only $10. It includes their assembler, which
unfortunately, is not compatible with MASM, and minimal documentation
for the assembler.

The CTrace debugger works for me. I don't have a lot of experience with
other debuggers, so I can't compare. CTrace seems to have your normal
complement of debugging features; breakpoints, watchpoints, multiple
windows, trace execution, etc.

The main reasons I would think twice about buying Power C are if you
will be interfacing with 3rd party function libraries or you have a
need for inline assembly. I haven't tried their MIX utility that
converts .OBJ files to .MIX, so I can't say if you'll have trouble
interfacing to MASM code.

Order and upgrade number: 800-333-0330
Power C compiler: $19.95
Power Ctrace debugger: $19.95
Library Source: $10
BCD Business Math: $10
Shipping: $5

Selected portions of read.me file distributed with Power C 2.0 follows.
The file says its a beta version, but I called MIX and they say that
this is the release version.

                     Power C - Version 2.0

Beta test version: 2 February 1990

Please report any problems to :

             Technical Support
             Mix Software
             1132 Commerce Drive
             Richardson, TX 75081
             [214-783-6001]

The compiler should be installed using the install program on disk 1.
This program simply unpacks the files to a directory on your hard
disk or to floppies.  It does not alter the environment, config.sys
or autoexec.bat.  If you are installing to 5 1/4 inch floppies, you
will need 4 formatted blank disks.  If you are installing to 3 1/2
inch diskettes, you will need 2 formatted blank disks.  If you are
installing to a hard disk, you will need approximately 1 Meg (1000k)
of disk space.

New Features in version 2.0

   Memory models:
      Memory models are a reflection of the addressing modes of the
      8086 family of processors.  The 8086 family uses 64k segments.
      Special techniques are required to exceed the 64k limits on code
      and data.  A simple (16 bit) address is confined to one 64k
      segment.  These are called "near" addresses.  It is also
      possible to use an address that occupies 32 bits.  These "far"
      addresses are normally stored as a segment number and a
      corresponding offset.

      In small memory model, the code resides in a single 64k or
      smaller segment.  Calls to functions use "near" addresses.
      The data in small model is also located in a single 64k or
      smaller segment.  Data references also use "near" pointers.
      The advantage of small memory model is that the code is
      smaller than the other models since function calls use 3
      bytes instead of 5 bytes.

      In medium memory model, the code can occupy more than 64k of
      memory.  All function calls use "far" addresses.  In Power C,
      each function starts a new segment.  This allows any function to
      be up to 65520 bytes in length.  The data in medium model is
      located in a single 64k or smaller segment.  Data references use
      "near" pointers.  Medium model is usually the best choice for
      most programs.  Code size is not limited and any large blocks of
      data can be declared as far if 64k of data is not enough.

      Large memory model uses unlimited code space like medium memory
      model.  Data in large memory model can occupy more than 64k of
      memory.  References to data in large model are with "far"
      pointers.  Large model is the least efficient of the memory
      models.  Each reference to a pointer takes more time and
      generates more code.  Large model is a good choice for programs
      originally developed for larger computers that do not use
      segmentation.

   Large memory model
      Large memory model is selected with the /ml compiler switch.
      In large memory model, all pointers are far by default.  You
      can still use near pointers by including the "near" keyword.
      Near pointers can only point to objects that are "near" or
      auto.

      Global variables may be near or far depending on their size.
      Small variables (less than 256 bytes) are stored in near
      memory by default.  This allows them to be accessed more
      quickly.  Larger variables are stored in far memory.  You
      can always override the storage class with the "near" or
      "far" keyword.  Also, you can change the default size for
      far variables with the /z compiler switch.

      Addressing is done using near addresses whenever the variable
      is auto or is in near memory.  If a pointer or address is
      passed to a function, it is automatically converted to a far
      pointer.

   Small memory model

      Small memory model is selected with the /ms compiler switch.
      In small memory model you are limited to 64k of code.  Small
      model is a good choice for programs that do not need more than
      64k.  The program will be smaller and slightly faster in small
      model.

   Far and huge data

      Far and huge data is supported by Power C in all memory models.
      You can declare a variable to be far or huge by including the
      far or huge keyword in the declaration.  To specify the storage
      for a variable, the keyword should be immediately before the
      variable name.  Examples:

            char far a[200];        /* far array of 200 characters */
            char * far b[200];      /* far array of 200 pointers to char */
            char far * far c[200];  /* far array of 200 far pointers */
            char far *d[10];        /* near array of 10 far pointers */
            int huge e[40000];      /* huge array of 40000 integers */

      Huge arrays and structures can be as large as available memory will
      allow.  Huge variables can be larger than 64k bytes.  Since
      addressing a huge array or structure requires calculating both
      a segment value and an offset, access to huge objects is slower
      than access to far objects.  You should use huge variables and
      huge pointers only when you need the ablity to have an object
      larger than 64k.

New compiler switches:
   /ms, /ml specify small or large memory model
   /z       gives the threshold size for far variables in large
            memory model.  Global variables less than or equal to
            this size are placed in near memory, and larger variables
            are placed in far memory.  The /z may be followed by a
            size as a decimal number.  A size of zero, makes all global
            variables far unless they have a near keyword.  /z is
            equivalent to /z0.  The default threshold size is 256 bytes.

   /a       Adjust variable addresses to word or double word boundaries.
            /a or /aw places all 2 byte or larger variables at an even
            address.  /ad places all 4 byte or larger variables at an
            address that is a multiple of 4, and all 2 byte variables
            at an even address.  This option will improve speed on
            computers with a 16 bit or wider memory bus (such as the
            IBM AT or other 80286 base machines).

Predefined macros

   __POWERC - value is the version of power C.  Versions less than 1.2
              have the value "1".  Version 1.2 is "120", 1.3.0 is "130"
              and version 2.0.0 is "200".

   M_I86SM  - defined if small memory model
   M_I86MM  - defined if medium memory model
   M_I86LM  - defined if large memory model
   __LINE__ - current compiler line number
   __FILE__ - name of source file
   __DATE__ - compile date
   __TIME__ - compile time
   __STDC__ - standard C, "1" if extended keywords are disabled,
              "0" if extended keywords are enabled.

Mix.exe

   The conversion utility now has a switch to elimiate extra underscore
("_") characters from the beginning of external names.  Some compilers
generate an extra leading underscore character on all external names.
If you are converting an assembly function originally written for
one of these compilers, you can use the "/_" switch to eliminate the
extra underscore.