delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/12/11/02:16:27

From: Bill Currie <bcurrie AT tssc DOT co DOT nz>
Newsgroups: comp.os.msdos.djgpp
Subject: Re: NASM functions
Date: Thu, 11 Dec 1997 13:34:14 +1300
Organization: Telecommunication Systems Support Centre
Lines: 24
Message-ID: <348F3506.58BA@tssc.co.nz>
References: <348F20C7 DOT 4ED52C21 AT spam DOT me>
NNTP-Posting-Host: node106.tssc.co.nz
Mime-Version: 1.0
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

Ryan McGee wrote:
> 
> I would greatly appreciate it if someone could explain to me how this
> code allows you to accsess your paremiters passed to that function:
> 
> push ebp
> move eax, [ebp + 8)
     ^
typo?

> 
> The question I have is how do you access the stack by pushing the value
> of bp onto it?  Thanks

It doesn't.  There's a `mov ebp,esp' line missing. ie

push ebp
mov ebp,esp
mov eax,[ebp + 8]
...

Bill
-- 
Leave others their otherness

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019