Message-Id: Date: Tue, 5 Aug 97 22:10 MET DST To: djgpp AT delorie DOT com References: <01bca0ea$65213dc0$56a333cf AT gisco DOT net DOT gisco DOT net> Subject: Re: Help with using Nasm MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8BIT From: Georg DOT Kolling AT t-online DOT de (Georg Kolling) Precedence: bulk Ben Cohee schrieb: > Hello, i have a couple of questions about Nasm and how it passes > parameters. Ive read that to acess the parms that you have to have > push ebp > mov ebp, esp > and that from then the parms can be acessed by [ebp + 8] for the first parm > and +4 for every parm after that. The question is does this matter what > type of parm it is? Like char * or int or fix. I really don't know why esp is copied to ebp (at least NASM's example code does so). But it does matter what type of parm it is! for example: c prototype void xxx (char a, short b, long c) a = BYTE [esp + 4] b = WORD [esp + 5] c = DWORD [esp + 7]