From: Matthew Mastracci Newsgroups: comp.os.msdos.djgpp Subject: Re: NASM + DJGPP newbie problem Date: Fri, 19 Sep 1997 08:13:24 -0600 Organization: The University of Calgary Lines: 36 Message-ID: <5vu1ck$um2@ds2.acs.ucalgary.ca> References: <341FD2A0 DOT 54CC1C76 AT mwci DOT net> NNTP-Posting-Host: mmastrac AT acs2 DOT acs DOT ucalgary DOT ca Mime-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII In-Reply-To: <341FD2A0.54CC1C76@mwci.net> To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Precedence: bulk On Wed, 17 Sep 1997, Larry Swanson wrote: > I recently decided to learn how to program in assembly using NASM and > DJGPP. I'm having a problem trying to get the following code to work. > (I usually get a message like 'access denied') that appears to be when I > push something on the stack. > _AddFour: > push ebp; > mov ebp , esp; [cut] > mov ebp,esp > pop ebp > ret > ;End of You mixed up: mov ebp, esp pop ebp ret should read: mov esp, ebp pop ebp ret Also in the other two procedures. That should fix your problems... /\/\att /\/\astracci mmastrac AT acs DOT ucalgary DOT ca GCS/GE d- s+:+ a--- C++++ UA P+ L E-- W+ N++ o K+ w+ O M- V PS++ PE++ Y+ PGP t+++ 5+++ X++ R++ tv+ b+++ DI++++ I G++ e h r* z?