Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP
Path: utzoo!mnetor!seismo!lll-lcc!pyramid!amdahl!drivax!holloway
From: holloway@drivax.UUCP (Bruce Holloway)
Newsgroups: comp.sys.atari.st
Subject: Re: C Compiler Startup Code
Message-ID: <748@drivax.UUCP>
Date: Fri, 9-Jan-87 12:37:21 EST
Article-I.D.: drivax.748
Posted: Fri Jan  9 12:37:21 1987
Date-Received: Sat, 10-Jan-87 01:40:10 EST
References: <8701082100.AA14694@ucbvax.Berkeley.EDU>
Reply-To: holloway@drivax.UUCP (Bruce Holloway)
Organization: Digital Research, Inc., Monterey
Lines: 24

In article <8701082100.AA14694@ucbvax.Berkeley.EDU> HOWESDW%WSUVM1.BITNET@forsythe.stanford.edu writes:
>In a recent posting, Moshe Braner asked why the code generated by a C
>compiler is longer than that for an equivalent assembler program, and if
>it would be possible to eliminate the additional code. In a word, the
>answer to that is no, since the additional code is generated by the
>compiler to handle program startup and termination.

Alcyon C does not generate extra code to handle the "main" function. The
command line interpretation is handled by another small module that is linked
in later.

And the answer is 'yes, you CAN get rid of it'. If you use no command line,
and more importantly, none of the I/O subroutines, then you can replace it
with a simple module which merely shrinks the memory -- or if that's not
important, just be sure that the MAIN subroutine is the first piece of code
linked, and don't include anything at all.

I've used a lot of 'C' compilers, and I know of none that generate extra code
for the "main" subroutine. I have seen compilers that change the name of
the "main" subroutine, though.
-- 
....!ucbvax!hplabs!amdahl!drivax!holloway
"What do you mean, 'almost dead'?" "Well, when you stop breathing, and moving
around, and seeing things... that kind of almost dead."