Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!bloom-beacon!apple!oliveb!sun!pepper!cmcmanis From: cmcmanis%pepper@Sun.COM (Chuck McManis) Newsgroups: comp.sys.amiga.tech Subject: Re: Lattice startup code questions Keywords: C Startup small how? Message-ID: <90987@sun.uucp> Date: 23 Feb 89 17:10:38 GMT References: <9322@bloom-beacon.MIT.EDU> <90452@sun.uucp> <6054@cbmvax.UUCP> Sender: news@sun.uucp Reply-To: cmcmanis@sun.UUCP (Chuck McManis) Organization: Sun Microsystems, Mountain View Lines: 17 In article <6054@cbmvax.UUCP> jesup@cbmvax.UUCP (Randell Jesup) writes: > Please, use exit() or equivalent (XCEXIT in lattice c.a) instead >of Exit(). Exit is really more for BCPL, and with most compilers you >should call a cleanup routine. Look at c.a, once again. Randell missed the point, maybe you did too. *Don't* use the compiler exit() if you *didn't* use the compiler startup file. The exit routine will often make assumptions about what the startup module did. And since we were explicitly _not_ going to use the c.a startup module you can't use exit(). You must use another method, I've found that Exit() works, but in the c.a module Lattice simply wacks the stack and does an rts. Guess you might have to experiment to get it right. --Chuck McManis uucp: {anywhere}!sun!cmcmanis BIX: cmcmanis ARPAnet: cmcmanis@sun.com These opinions are my own and no one elses, but you knew that didn't you.