From: Mark Slagell Newsgroups: comp.os.msdos.djgpp Subject: Re: What registers do I have to save when using external assembler functions? Date: Mon, 09 Jun 1997 16:38:38 -0500 Organization: dept. of redundancy dept. Lines: 19 Message-ID: <339C77DE.2E1@geocities.com> References: <339c502e DOT 3723200 AT nntp DOT netcomuk DOT co DOT uk> NNTP-Posting-Host: dial28.ppp.iastate.edu Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Precedence: bulk I can't remember the answer, but you can find out by writing a simple C function that requests too many register variables, say six. Compile it (unoptimized) with the -S switch, then see which registers get saved in the resulting assembly code. William McGugan wrote: > > What registers do I have to save when using external assembler > functions? I'm asking because my assembly functions crash with -O, and > I thought it might be due to DJGPP using a register variable that was > corrupted my asm functions. > > I have declared all my global variables and external functions as > volatile, but that doesn't seem to help. > > Thanks. > > William McGugan > http://www.netcomuk.co.uk/~wmcgugan