Date : Thu, 30 Sep 1982 10:23:00-PDT
From : chesley.tsca@Sri-Unix
Subject: Software Toolworks C/80
A friend of mine just bought this C compiler, and I've been reading
the manual. I don't remember seeing any mention of it here, so let me
summarize it. It looks very good, and only costs $50.
It's Kernighan & Ritchie C, except no:
o float, double, and long data types (actually it will
accept long, but stores it as 16-bits, just like int).
o typedef.
o Arguments to #define macros.
o Bit fields.
o #line.
o Declarations within nested blocks (i.e., you have to
declare all local variables at the beginning of the
function definition).
It does have compile-time initializers, type casts, and static.
It produces assembly code (and you can include assembly inline in
the C code with the #asm directive), for either an abs assembler provided
with the package, or for Microsoft Macro-80 (so you can link it with other
Macro-80 programs).
The compiler will produce execution profile code. If you have a
real-time clock available, it will tell how much time was spent in each
function, and even if you don't, it will tell you how many times each
function was called. A related facility allows tracing, by telling you
each time a function was entered or exited.
It uses an interesting approach to local variables: There are two
types: auto and register. Auto variables are allocated on the stack, but
register variables are allocated at abs locations but then saved on the
stack when the function starts up (making references to them much faster).
Local variables default to register, but can be forced to auto by declaring
them as such. Parameters can also be declared register, in which case they'll
be moved to abs locations at function startup time.
Run-time support includes I/O redirection of standard in/out
(following the Unix V6 model of fin/fout, not the stdio model of
stdin/stdout/stderr), random access file I/O, and limited storage
allocation (you can alloc, but you can't free) .
The starting point for this compiler was Ron Cain's SmallC, but it
sure has been expanded a lot.
I haven't played with the compiler at all (I plan to get a copy and
try some benchmarks, etc.), but if it does what the manual says, and
assuming it produces reasonable code, it sure looks nice.
--Harry...