Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!decvax!bellcore!ulysses!allegra!princeton!caip!seismo!rochester!rocksanne!sunybcs!kitty!baylor!peter From: peter@baylor.UUCP (Peter da Silva) Newsgroups: net.micro.amiga Subject: Re: Re: Question about Alink Message-ID: <671@baylor.UUCP> Date: Fri, 23-May-86 22:51:34 EDT Article-I.D.: baylor.671 Posted: Fri May 23 22:51:34 1986 Date-Received: Sun, 25-May-86 15:49:00 EDT References: <928@h-sc2.UUCP> <247@cbmvax.cbmvax.cbm.UUCP> Distribution: na Organization: The Power Elite, Houston, TX Lines: 46 > In article <928@h-sc2.UUCP> wen_2@h-sc2.UUCP writes: > > > >Is it possible for those of us outside of West Chester and Los Gatos to use > >Alink to produce short executables? For example, is it possible to link a > >"hello, world" to a less-than-10K executable, and how is this done? I know > >it IS done, (look in c: for examples) but can I do it, too? Don't call in stdio. Try this: _main() { write(1, "Hello world\n", 12); } Or if you're not into counting: _main() { writes(1, "Hello world\n"); _exit(); } writes(fd, s) int fd; char *s; { return write(fd, s, strlen(s)); } strlen(s) char *s; { int len = 0; while(*s) { s++; len++; } return len; } Or you can even use the AmigaDos calls instead of the UNIX-style calls and get it down near the 30 byte mark. -- -- Peter da Silva -- UUCP: ...!shell!{baylor,graffiti}!peter; MCI: PDASILVA; CIS: 70216,1076