delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1998/05/07/03:24:00

Date: Thu, 7 May 1998 10:23:48 +0300 (IDT)
From: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
To: Lars Andersson <lars_and AT algonet DOT se>
cc: djgpp AT delorie DOT com
Subject: Re: Watcom->DJGPP inline ASM
In-Reply-To: <3550BF8C.F9DD536D@algonet.se>
Message-ID: <Pine.SUN.3.91.980507101914.5259I-100000@is>
MIME-Version: 1.0

On Wed, 6 May 1998, Lars Andersson wrote:

> inline asm pragmas... The AT&T syntax should be no problem but
> I don't know how to pass parameters and return values etc...

This is described in the GCC documentation.  From the DOS prompt type the 
following:

	info gcc "C Extensions" "Extended Asm"

(the quotes are important!), and read there.  The syntax is different, 
but the functionality is similar.

> #pragma aux Fixed_Mul64=\
> #pragma aux Fixed_Div64=\

OTOH, you might reconsider why you at all need these in inline assembly.  
DJGPP supports a type long long which is 64 bits, so you could just use 
it here and let the compiler do the hard work.

> #pragma aux Float2Int=\

Why isn't a simple assignment do here?  For example:

	int i
	double d;
	....
	i = d;

- Raw text -


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