Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!watmath!clyde!caip!topaz!nike!ucbcad!pavepaws!chapman From: chapman@pavepaws.berkeley.edu (Brent Chapman) Newsgroups: net.micro.amiga Subject: Re: printf() code size using Astartup.obj and AMIGA.LIB only Message-ID: <742@ucbcad.BERKELEY.EDU> Date: Fri, 27-Jun-86 02:45:45 EDT Article-I.D.: ucbcad.742 Posted: Fri Jun 27 02:45:45 1986 Date-Received: Sat, 28-Jun-86 03:59:30 EDT References: <8606270438.AA07486@pavepaws> Sender: news@ucbcad.BERKELEY.EDU Reply-To: chapman@pavepaws.UUCP (Brent Chapman) Organization: UNIXversity of California, Berkeley Lines: 36 In article <8606270438.AA07486@pavepaws> dillon@PAVEPAWS.BERKELEY.EDU (Matt Dillon) writes: > > This should lay to rest any further arguments about printf(). > > >(linking only with AMIGA.LIB and Astartup.obj, Lattice C 3.03) > >source executable > >main() {} 1880 >main() {printf("hello\n");} 2376 > > As you can see, printf() takes 496 bytes, PERIOD, when called from >amiga.lib (it may or may not use the DOS run-time library, but that doesn't >really matter). > > -Matt What you've just done is pretty useless. You could just as well use puts() for that. printf() is "print FORMATTED". Give us some REAL examples, that actually do some formatting, to see whether or not the code size increases (in other words, whether or not the compiler is smart enough not to include the formatting routines it doesn't need). I'm guessing, but I'd expect code size to increase (I don't have my Amiga yet, so I can't test it myself). Brent -- Brent Chapman chapman@pavepaws.berkeley.edu ucbvax!pavepaws!chapman TANSTAAFL! (There Ain't No Such Thing As A Free Lunch!)