www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/02/20/02:03:43

Date: Thu, 20 Feb 1997 08:51:05 +0200 (IST)
From: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
To: Luke Lee <comforth AT ms2 DOT hinet DOT net>
cc: djgpp AT delorie DOT com
Subject: Re: Does DJGPP allow pascal calling convention ?
In-Reply-To: <330B2F3E.4452@ms2.hinet.net>
Message-ID: <Pine.SUN.3.91.970220084616.25071C-100000@is>
MIME-Version: 1.0

On Thu, 20 Feb 1997, Luke Lee wrote:

>    Does any one know how to write a function with pascal calling
>    convention ? I've got some 'machine codes' which are made of . 
>    And I've called them successfully, but, I must reverse my 
>    parameters everytime I call it.

I didn't really test this (so caveat emptor), but it seems that declaring
your function with the `stdcall' attribute and using the -mrtd switch to
gcc is what should make the trick for you.  The "Function Attributes" and
"i386 Options" sections in the gcc info docs is where you should read
about them. 

- Raw text -


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