From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: 103376,2cb1f0b6d642e1dc X-Google-NewGroupId: yes X-Google-Attributes: gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,UTF8 Path: g2news1.google.com!news3.google.com!feeder.news-service.com!94.75.214.39.MISMATCH!aioe.org!.POSTED!not-for-mail From: =?utf-8?Q?Yannick_Duch=C3=AAne_=28Hibou57?= =?utf-8?Q?=29?= Newsgroups: comp.lang.ada Subject: Re: Pascal Calling Convention Date: Thu, 24 Mar 2011 01:43:57 +0100 Organization: Ada @ Home Message-ID: References: <9b04626e-567d-408c-aab3-39b964b3ffd6@l2g2000prg.googlegroups.com> NNTP-Posting-Host: 2QUn1ohZpH4hOnePpX4N1w.user.speranza.aioe.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed; delsp=yes Content-Transfer-Encoding: Quoted-Printable X-Complaints-To: abuse@aioe.org User-Agent: Opera Mail/11.01 (Linux) X-Notice: Filtered by postfilter v. 0.8.2 Xref: g2news1.google.com comp.lang.ada:18411 Date: 2011-03-24T01:43:57+01:00 List-Id: Le Thu, 24 Mar 2011 01:24:41 +0100, Randy Brukardt = a =C3=A9crit: > This is news to me, and I wrote the pragma Import support in Janus/Ada= . > Parameter passing in all of the Windows conventions (including C!) is > left-to-right. But perhaps whomever wrote that was confused by the fac= t = > that > the x86 stack grows downward, so the left parameter is the one at the > highest address on the stack. Even so, it is the first one pushed. While I read you, I can't avoid thinking you must be true, as this is th= e = only way to get variable number of parameters working for C. What is = confusing also, is that assembly program sometime use the stack as an = array : allocated room on the stack, and then do something looking like = = [ebp+0] :=3D ... [ebp+4] :=3D ... and so on. But I feel to remember para= meter = passing order for WinAPI is the reversed one than C. I will have a test = = tomorrow to check (I am not running Windows right now). -- = Si les chats miaulent et font autant de vocalises bizarres, c=E2=80=99es= t pas pour = les chiens. =E2=80=9C c++; /* this makes c bigger but returns the old value */ =E2=80= =9D [Anonymous]