See for yourself how these C's stack up! File BENCHC.ARC on your START
disk.
Opinions differ as to the relative merits of structured versus
unstructured programming languages, but no one can deny that C has
become one of the major development languages for microcomputers. In
the Fall, 1986 issue of START, I took a look at the then-available C
offerings for the ST. A lot has changed since then--for the
better--and it's time to take a new look. There's no doubt that the C
compiler market has some exciting packages to offer for the ST.
Since I first looked at C's two years ago, Antic Software has stopped
distributing GST C, and Prospero Software, who picked up some GST
products, plans to release their own C compiler in the near future.
Manx has released an ST version of its compiler that veteran Aztec
developers will appreciate. Megamax did the impossible--they made
their newest update (Laser C) even faster than before Metacomco's
Lattice C has added even more ANSI-compatible library functions to its
already robust library.
Finally, Mark Williams, having pulled off quite a coup in the IBM
market, is the first C compiler company to release a source-level
debugger for its compiler. Atari is now distributing Mark Williams C
as part of their Developer's Kit, but Alcyon C (now in version 4.0) is
still available from them at a very moderate price.
To start, let's find out what we're getting for our C development
dollar. All of the above companies include a symbolic debugger with
their basic packages and all but Lattice can do in-line assembly.
Lattice, Mark Williams and Megamax all include a resource construction
editor as a part of their standard packages and they also support Line
A calls directly from C. Only Manx does not offer makeR, diff and an
editor as part of its standard package (called the Professional
System), but it does offer them as part of its Developer System.
Versions
For this article, I examined and tested Manx Aztec Version 3.6, Laser
C Version 1.0, Lattice C Version 3.04 and Mark Williams C Version 3.0.
These were the latest versions available at press time. Manx and
Megamax are also developing source-level debuggers that should be
available by the time you read this review. (Editor's note: A review
of the debuggers is scheduled for an upcoming issue of START.)
Programming Environments
Manx and Mark Williams offer traditional command-line shells, while
Lattice and Megamax use graphics shells. The Manx package includes the
Gulam shell, a snappy freeware piece included with the package. With a
little bit of work, this shell could easily be the best command line
program, in part because of its fully editable command history, which
lets you recall, edit and re-enter previous commands. Along with its
command-line editing capability, Gulam offers many commands of the
other command-line processors, but it has a different orientation. For
example, as with the EMACS editor, you can redefine the key bindings.
Gulam even has some primitive XMODEM capability. Interestingly enough,
one of Gulam's intrinsic commands is grep, a command that Manx
normally only distributes with its Developer System.
A standard, comfortable Unix-like shell is a significant part of Mark
Williams C's charm. Its commands are modeled after Berkeley Unix 4.2
and the Bourne shell. The only thing I absolutely do not like about it
is the fact that I can't edit the command history. I can repeat
commands and append or prepend to previous commands, but not edit.
Even so, this is still the shell I use every day (Executives want to
point, managers want menus and programmers want a command line!) With
all of the utilities that Mark Williams offers as part of their
package, it wouldn't surprise me to see the Unix utility awk show up
as part of their package.
For those who prefer graphics shells, Lattice includes Menu+, a handy
graphics shell that lets you create and optimize your development
environment. In fact, Menu+ is available as a separate package and can
be customized to work with any language or development system you
choose. Megamax's graphics shell offers the flexibility of Menu+ and
is so intuitive and powerful that it makes traditional GEM
applications seem cumbersome. You'll find yourself wondering why
everyone doesn't do graphics shells this way. It's the best graphics
shell I've seen.
Every shell but Lattice maintains a directory path cache in memory to
speed file access, but Megamax blows the others away by maintaining an
actual memory cache of any file loaded into memory. It seems to be
even faster than Beckemeyer's dedicated cache.
The Editors
The Megamax editor is adequate for touch-ups, but it's not intended
for actual development. It is intimately connected to the shell and
serves primarily for fixing syntax errors after a compile. The package
also includes a disassembler, an archiver, a full make utility, a
resource construction set and several development utilities. The
accompanying library is complete and includes standard utility
routines for manipulating windows that should have been in the
original Atari TOS operating system.
The Mark Williams package includes MicroEMACS 1.8, with source code.
This is a very serviceable editor and EMACS editors are common on a
wide variety of development systems.
The Manx editor, z, is a clone of the famous Unix editor vi, which
operates much like the first editors to appear on the Atari 8-bit
machines. Like all the early editors, it has a command mode and an
insertion mode. If you are familiar with vi, you can sit down and
begin work immediately And Manx's manual is so good that I was almost
convinced to go back to vi--the lack of a clear understanding of vi's
capabilities and the frustration with its manuals had originally
persuaded me to abandon it in favor of EMACS. It's not a WYSIWYG
editor, but it's very useable, even for development. Unfortunately, it
comes only with the Developer System.
The Lattice editor that comes with the system has been enhanced and
has a GEM interface, as well as the previously available command
capability. These commands include a full range of function and cursor
movement capability. The editor is integrated with the shell and can
be used for development.
The Manuals
Mark Williams and Megamax's manuals are the largest, the most complete
and the easiest to read. The Mark Williams manual is like an
encyclopedia; it takes some getting used to, but once you do, it is
very flexible and easy to use. Both offer numerous programming
examples in hard copy and soft copy. Lattice and Manx have some
examples, but these seem more of a token gesture. Of the packages
reviewed, only Manx fails to offer complete AES/VDI documentation.
Mark Williams also has the best table of contents, while Lattice's is
barely acceptable. However, Lattices index is the most complete I have
ever seen in a computer manual. No other package I reviewed has an
index that comes close. The content of Lattices manual is good; each
function is clearly documented and the concerns and cautions involved
with each are clearly presented. Only Lattice included the warning
about using "vqr_string" and "vsm_string" with AES (you can't,
possibly due to a bug in the operating system). Megamax even dropped
all references to these functions.
Both Manx and Lattice very carefully document any potential
differences between their utilities and function calls and what you
would expect on other systems. Since compatibility and portability are
major reasons many developers standardize on these packages, backward
and cross-development are also covered.
Megamax has completely revised its documentation and, overall, I liked
both the content and the layout of the Laser C manual better then any
of the others. Beginning and experienced programmers can run GEM
applications easily and quickly with this package.
Support
All of the companies offer online support: Manx, Megamax and Lattice
have their own bulletin boards, while Lattice and Mark Williams have
conferences on Bix. All but Lattice have technical phone line support,
but only Mark Williams has a toll-free 800 number. Manx offers their
library source code for $300 and Megamax does so for $50. Megamax also
offers the source code to its freeware program Megaroids for $25.
Features And Changes
Megamax Laser C
Laser C (formerly Megamax C) has changed the most since the last
review. It's a different compiler package now. The graphics shell is a
delight and the system works smoothly in both hard and floppy disk
environments. Due to the memory cache, compiles that take 35 seconds
on the first pass take only two to seven seconds on subsequent passes.
Linking is impacted even more.
Megamax has eliminated the 32K/64K limit on programs and data by using
absolute code instead of PC-relative code. Explicit memory models are
not supported. While absolute code takes longer to load and is slower
then PC-relative code, it doesn't have PC-relative code's memory
limitations.
The linker is now DRI-compatible and significantly faster.
Unfortunately, it now links in whole files instead of just the needed
functions. To support DRI compatibility, variable uniqueness has also
been reduced from 32 characters to eight.
Megamax's $20 upgrade fee covers both new manuals and new diskettes.
For anyone who already owns an earlier version of Megamax, this is
practically a steal.
Mark Williams C
Mark Williams C is an interesting package. It's the only one that
offers an installation program; it works very well and is a model of
how installations should be done. Mark Williams addresses the
development speed difference by including a RAMdisk program in the
package, complete with source code. (The benchmarks listed in the
table were not performed with the RAMdisk.) With a RAMdisk to hold the
temporary files, Mark Williams C speeds up considerably, although it's
still not as fast as Laser C.
With the RAMdisk, the compiler and Iinker are reasonably quick. If you
have the memory, you will definitely want to use this option. Like
Manx and Lattice, Mark Williams uses the traditional four pass
compiler--a well-known, but relativgly slow approach. There is a huge
assortment of options for the compiler and linker. One useful option
is to eliminate the code to manipulate command line argumgnts if you
don't plan to use them. Other options can add code to handle wildcard
expansion and nested comments.
This system has a solid feel that the racier Laser C seems to lack. It
seems to draw experienced programmers. I know many developers who
first bought Megamax for its speed and then later migrated to Mark
Williams C. I like the Mark Williams offering; it offers a lot to the
Unix or DOS programmer looking for a familiar development environment.
Manx Aztec C
Despite its excellent Gulam command-line shell, Aztec C has two fatal
flaws: it's far better at allocating memory than freeing it and I
often ran out of room and had to reboot. Also--and this is partially
Atari's fault--it's possible to save a file with the same file name as
one already in the directory without deleting or overwriting the
earlier version. This is extremely frustrating, to say the least.
Of the traditional four-pass compilers, Aztec C was the
fastest--almost twice as fast as both Lattice C and Mark Williams C.
In the Dhampstone test, the code it produced outran every other
compiler except in the character manipulation routines. One aspect of
Manx's compiler that I really like is its memory modeling: by setting
the appropriate switches, you can choose any of four memory models.
This gives you the best of both worlds and you don't have to choose a
particular memory model at the time you buy the compiler.
After Megamax, Manx's linker was far and away the fastest I tested.
Its link times were a quarter of Lattice's and less then half of Mark
Williams. These times are more impressive because Manx also produced
the smallest size code. Its major drawback is it cannot gracefully
deal with a library forward reference.
The Developer System includes z, make, grep, diff and a really
delightful utility called c-tags. While this package is reasonably
complete, I feel that it's overpriced for the additional capabilities
it provides over the Professional System. What Manx is providing as an
extra options package, the other compiler publishers are offering as
part of their standard system.
One saving grace for Manx is that it has also been implemented on the
Amiga, Macintosh, MS-DOS machines and Apple II family. Manx even sells
a cross-development package for $500. For developers interested in
writing portable code, Manx may offer an advantage. The price for this
advantage, however, is high.
Lattice C
The basic packaging of the Lattice compiler may not have changed much,
but there have been some significant enhancements in addition to
Menu+. The manual includes the new ANSI library extensions, so this
package addresses one of the concerns often given about the Lattice
development systems: they have historically used a non-standard
library. The old Lattice library functions are still available, but so
are the standard Unix and the ANSI functions.
The compiler and linker haven't changed much since the last review.
They are still the only fully ANSI-compatible system. One of the ANSI
features that only Lattice supports is function prototyping, which
takes some getting used to, but it can really save you grief by
catching some extremely subtle bugs at compile time.
Lattice indicates that they have sped up their floating point library,
and that portion of Lattice's Dhampstone tests are better than any of
the other packages tested.
Benchmarks
I did the benchmarks differently this time than when I first reviewed
ST C programs. Each package had its own floppy disk containing the
source code. This removed the effect of fragmentation when using a
hard disk and let me keep the times and file sizes on each disk. Each
compilation and execution was done at least twice in the environment
that came with each system. This gave me the basic look and feel of
each packages edit, compile, link and run cycle. Also, it reduced the
times in Megamax's bench runs (which was a surprise).
Megamax's caching should be kept in mind when reviewing the compile
times. The programs compiled were relatively small and much of the
time for the other packages was spent just loading the compiler and
linker into memory. If you would like to study the benchmarks I used,
they are on your START disk in the archive file BENCHC.ARC; refer to
the Disk Instructions located elsewhere in this issue if you are
unsure how to un-ARC a file.
Conclusions
Mark Williams C will probably remain the package of choice for those
who want to work with a command-line processor. It has the most
complete, bug-free command shell available as part of a compiler
package. It's also the only system with a source-level debugger. Its
compile times need improvement, but the included RAMdisk helps.
Aztec C offers cross-developers a bridge to or from the ST market. Its
most serious flaw is that Manx does not really seem to understand this
market. At $300 for the Developer System, $200 for the Professional
System and $150 for the source-level debugger, Manx will probably have
a hard time attracting new developers. While Manx offers a very good
compiler, the company is still charging too much for a package that
offers too little. (Editor's Note: Manx currently has a limited-time
half-price offer on their compiler packages, which expires September
30, 1988 )
Lattice C is a complete development package and offers the same
capabilities as the other C's covered here, but at a more economical
cost. The ANSI compatibility offers a reasonable assurance that you
can port your ANSI-compatible platforms to the Atari.
The Laser C package is unbelievable; it has an extremely innovative
approach to compiler development. The techniques are the kind you'd
normally expect to encounter in much more of an "ivory-tower"
situation and the results are stunning. Right now the major weakness
is in the actual code it produces. While it is competitive, it doesn't
really stand out; disk I/O is unusually slow and the code size is
second only to Lattice C.
However, despite these concerns, 30-minute compile times just aren't
as attractive as five-minute compile times. With the release of Iaser
C, Megamax is currently the C development compiler to beat in the ST
marketplace.
Arick Anders remarked after finishing this article that programmers
are among the luckiest professionals around: they get paid for doing
their hobby!
Products Mentioned
Alcyon C Version 4.0, $20; Atari Developer's Kit (includes Mark
Williams C and system documentation), $300 or $350 (price not set at
press time). Atari Corp., 1196 Borregas Ave., Sunnyvale, CA 94088,
(408) 745-2000.
Mark Williams C Version 3.0, $179.95. 1430 W. Wrightwood Ave.,
Chicago, IL (312) 472-6659.
Laser C Version 1.0, $199.95; updates, $20 with original disk.
Megamax, Inc., Box 851521, Richardson, TX 75085-1521, (214) 987-4931.
Aztec C Version 3.6--Professional System, $199; Developer System,
$299. Aztec, 1 Industnal Way, Eatontown, NJ 07724, (800) 221-0440;
201-542-2121 in New Jersey (Note: These products will be available for
half-price until September 30, 1988.)
Lattice C Version 3.04; $149.95. Metacomco; distributed by Lattice
Inc., 2500 S. Highland Ave. #300, Lombard, IL 60148, (312) 916-1600.
HELLO.C COMPILE TIMES
Compile Link Compile/Link size
Lattice :39 2:22 2:59 12850
Manx 1:32 :24 1:56 5547
Mark Williams 1:55 1:13 3:10 5630
Megamax :02 :03 :04 10715
DHAMPSTONE BENCHMARKS COMPILE TIMES
Compile Link Compile/Link size
Lattice 2:37 3:08 5:45 22263
Manx 1:02 :38 1:40 11868
Mark Williams 1:55 1:13 3:10 13336
Megamax :07 :03 :08 16445
DHAMPSTONE
Char Int Fib^1 Long Double Disk I/O
Lattice 7:40 3:05 1:95 :32 :38 11:78
Manx 7:93 2:03 1:68 :25 :43 11:08
Mark Williams 7:55 2:22 1:87 :28 :60 15:72
Megamax 7:35 2:03 1:78 :27 :50 18:68
1Fib: The Fibonacci recursion test.