!pr1
A Look at the Aztec C Compiler for Apple DOS........Bill Morgan

As I mentioned last month, I'm getting very interested in the C language.  That August issue of Byte definitely turned me on, so I've started to look at ways to get C into my Apple.

Byte featured a comparative review of several C compilers for CP/M.  One of the highest-rated was the Aztec C Compiler System, which is also available for Apple DOS 3.3.  The Aztec compiler was given especially high marks for being truly complete and compatible with the standard for C, the book "The C Programming Language", by Kernigan and Ritchie.

I haven't had a chance to actually do any programming with the Aztec system yet, but, thanks to Donna Lamb, a subscriber in New York City, I was able to spend an afternoon looking over the manual.  Here are some of my impressions.


Manual

The manual is 135 pages long in 5 chapters and 2 appendices:

!lm+3
!rm-3
!pp-3
Tutorial Intro - 15pp - Getting started, configuring and using the SHELL, compiling, assembling, linking and executing.  A get-your-toes-damp intro to the system.

Shell - 22pp - The SHELL program resides in the language card, at $D000-$F7FF.  It replaces the Command Interpreter portion of DOS 3.3 and provides a UNIX-like user interface, including I/O redirection and command parsing with argument passing.

Programs - 23pp - Using the editor, compilers, assemblers, linker, and utilities.  

Libraries - 33pp - Discussion of the Standard I/O, System I/O, Utility, and Math Routines supplied with the system.

Technical Info - 28pp - Miscellaneous information on the internals of the system and the assembly-language interface.  Manx promises continuing additions to this chapter, as part of the updates.

Appendices - 12pp - Error messages and examples of the compiler and assembler outputs for a simple program.
!lm-3
!rm+3
!pp0


DOS 3.3 Interface

The disks you receive from Manx do not include DOS, so to enter the system you must first boot DOS, then BRUN SHELL.

SHELL overlays the DOS Command Interpreter and patches at least two (unspecified) points inside the File Manager.  All the documentation has to say about non-standard (i.e., fast) DOS's is "try it and see."  I am told that Diversi-DOS does not work; I don't know about others.
Two Compilers for the Price of One

The Aztec system includes two separate compilers and two assemblers.  There is a compiler/assembler pair for generating native 6502 code, and another compiler/assembler for an interpreted pseudo-code.  The native code is fast but large, while the pseudo-code is slower but smaller.  You can compile most of your program to pseudo-code, compile the time-critical parts to machine code, and write any extremely critical sections directly in assembly language.  You can then link all these different object modules into one executable program.


Updates

The copy I saw was Version 1.05b of the Aztec system.  Updates are available for an unspecified "nominal" fee, or an automatic update service is available for $50 per year.

Drawbacks

The people I have talked to who use the Aztec system regularly mention two drawbacks:  compilation time and program size.  Much of the compile time problem seems to be a matter of the Apple's disk speed, which can be improved.

The program size is related to the size of the run-time routines and the libraries included in a program.  Experienced C programmers say that it is usually possible to manipulate the libraries to minimize the size of included code, but that is a fairly advanced technique.


ProDOS Version

There is supposed to be a ProDOS version of the Aztec system, which should be significantly faster, coming sometime.  It's too soon to tell when that is likely to appear, so we'll just have to wait.  The ProDOS version will be marketed as a completely separate version, rather than as an update to the DOS 3.3 version.


Conclusions

The Aztec C Compiler System is a full C compiler that runs in an Apple ][, and that makes it unique.  Since my interest is in learning C and starting to develop programs that will be used on other, more powerful computers, I plan to place my order as soon as the ProDOS version is available.

All things considered, the Aztec system is not a great approach for developing applications intended only for use on Apple ][ computers.  The Apple is simply too limited for full C.

Available from:  Manx Software Systems, Box 55, Shrewsbury, NJ 07701. (201) 780-4004.
