Date: Tue, 8 Jul 1997 10:11:53 -0700 (PDT) Message-Id: <199707081711.KAA26906@adit.ap.net> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" To: djgpp AT delorie DOT com From: Nate Eldredge Subject: Re: Djgpp and Asm Precedence: bulk John Conner wrote: >Ok, heres what I'm trying to do. > >asm("leal _RAM,%ebp"); /* RAM is a c pointer */ > >It crashes every time. I get a gpf or stack fault. >It works fine if I use esi,edi,ect. Any help? ebp is the frame pointer in C. It's used to address things on the stack (args, local variables, etc). Choices you have: - Tell GCC you trashed it. See the Extended Asm section of the GCC docs. - Save and restore it yourself. - Use a different register. HTH Nate Eldredge eldredge AT ap DOT net