From: Blaine Hodge Newsgroups: comp.os.msdos.djgpp Subject: Re: NASM and DJGPP Date: Sat, 23 May 1998 01:15:26 -0600 Organization: University of Alberta Lines: 24 Message-ID: <3566778E.192DF288@gpu.srv.ualberta.ca> References: <19980523034225 DOT AAE10307 AT ppp110 DOT cartsys DOT com> NNTP-Posting-Host: async11-16.remote.ualberta.ca 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 Just an observation, but doesn't -fomit-frame-pointer cause the compiler to use ebp at it's discretion? The only side effect is you can't use the GBU debugger and profiler. So, -fomit-frame-pointer should allow you to work with ebp, but I can't be sure of that. Blaine Nate Eldredge wrote: > > At 11:45 5/22/1998 -0700, Steven S. Falls wrote: > > In DJGPP asm I can make functions with ebp being used as a general > >register but In nasm when I use it it get a gpf. why? > > ebp has to be the frame pointer for GCC-compiled code. Your NASM code will > have to save and restore it. Why it worked before, I don't know, unless you > just got lucky. > > Nate Eldredge > nate AT cartsys DOT com -- Blaine Hodge E-Mail: bhodge AT gpu DOT srv DOT ualberta DOT ca WWW: http://www.ualberta.ca/~bhodge/