www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1999/02/15/20:42:04

From: jlrubin AT bway DOT nospam DOT net (Josh Rubin)
Newsgroups: comp.os.msdos.djgpp
Subject: Re: Again: Register calling conventions
Organization: nil
Message-ID: <36c8cabc.887021@news1.bway.net>
References: <36C85C4E DOT 580C4DA1 AT gmx DOT net>
X-Newsreader: Forte Agent 1.5/32.452
MIME-Version: 1.0
Lines: 17
NNTP-Posting-Host: 209.73.228.59
X-Trace: news5.ispnews.com 919128992 209.73.228.59 (Mon, 15 Feb 1999 20:36:32 EDT)
NNTP-Posting-Date: Mon, 15 Feb 1999 20:36:32 EDT
Date: Tue, 16 Feb 1999 01:36:24 GMT
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

On Mon, 15 Feb 1999 18:41:34 +0100, Sebastian Schuberth
<sebastian DOT schuberth AT gmx DOT net> wrote:

>What I wanted to know was: Is there a way to use the same external .asm
>file (which includes function definitions which are ment to be called
>using registers to pass arguments) with Watcom and DJGPP? I DO NOT want
>a header file with the "#pragma aux ... parm [..] .." stuff for Watcom
>and inline asm definitions for DJGPP. They BOTH should use the functions
>defined in the external .asm file.

Use inline asm to call the external function. Don't forget to declare
it global using inline asm, and to inform GCC about which registers
get zapped and which contain the results. Encapsulate the code that
loads registers and calls in a macro.

Josh
JLRubin AT bway DOT nospam DOT net  Remove nospam

- Raw text -


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