Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.1 6/24/83; site kobold.UUCP Path: utzoo!linus!decvax!genrad!grkermit!masscomp!kobold!tjt From: tjt@kobold.UUCP (T.J.Teixeira) Newsgroups: net.micro.68k Subject: Re: nargs Message-ID: <226@kobold.UUCP> Date: Thu, 29-Dec-83 18:24:07 EST Article-I.D.: kobold.226 Posted: Thu Dec 29 18:24:07 1983 Date-Received: Sat, 31-Dec-83 04:27:22 EST References: <363@sii.UUCP>, <2113@fortune.UUCP> Organization: Masscomp, Westford, MA Lines: 24 Another stack adjustment instruction is: ADDW #n*4,SP Remember, the 68000 will sign extend any operand applied to an address register. This has the same time/space performance as the LEA n*4(SP),SP instruction mentioned by sii!mem (Mark Mallet), and *is* actually generated by the Masscomp C compiler. Of course, all the other caveats apply, leading to the unfortunate result of if you *really* want it done right, you have to do it yourself. Of course, since it is easy to miscount arguments, and the C language (and most runtime systems) won't provide it for you, you could try a special "end-of-argument-list" value (e.g. 0 in execv and variants). -- Tom Teixeira, Massachusetts Computer Corporation. Westford MA ...!{ihnp4,harpo,decvax,ucbcad,tektronix}!masscomp!tjt (617) 692-6200