Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!henry From: henry@utzoo.UUCP (Henry Spencer) Newsgroups: net.micro.apple Subject: Re: Re. Advice needed on Aztec C: DOS 3.3 code quality. Message-ID: <4505@utzoo.UUCP> Date: Fri, 19-Oct-84 13:20:35 EDT Article-I.D.: utzoo.4505 Posted: Fri Oct 19 13:20:35 1984 Date-Received: Fri, 19-Oct-84 13:20:35 EDT References: <459@ittral.UUCP>, <111@utcsrgv.UUCP> Organization: U of Toronto Zoology Lines: 19 > ... all arithmetic operations are performed > in 16 bits, even if the operands are characters.... > ... > ...[in function calls, the compiler] insists on putting 2 bytes > on the stack per operand, no matter what. ... Technically, it is impossible to change either of these characteristics without violating the semantics of K&R C. So the authors have a (not trivial) excuse for doing it this way. It would probably have been nice if they'd provided an option to avoid this; some C compilers for micros supply such an option. The new draft ANSI C standard contains some careful wording to the effect that compilers are entitled to do such optimization if the results are certain to be identical to the unoptimized version. This was arguably true of the K&R definition too, but now it's explicit. -- Henry Spencer @ U of Toronto Zoology {allegra,ihnp4,linus,decvax}!utzoo!henry