comp.lang.ada
 help / color / mirror / Atom feed
From: Simon Wright <simon@pushface.org>
To: rleif@rleif.com
Cc: comp.lang.ada@ada.eu.org
Subject: Re: Ada and ASM
Date: Fri, 5 Sep 2003 20:09:15 +0100
Date: 2003-09-05T20:09:15+01:00	[thread overview]
Message-ID: <mailman.8.1062789111.295.comp.lang.ada@ada.eu.org> (raw)
In-Reply-To: <E19vIlZ-0002mO-Fg@punt-3.mail.demon.net> (rleif@rleif.com)

> From: "Robert C. Leif" <rleif@rleif.com>

> Although GNAT has moved in this direction, it appears to be far from a true
> Ada syntax representation. 
> From:
> http://gcc.gnu.org/onlinedocs/gnat_ug_unx/The-Volatile-Parameter.html#The%20
> Volatile%20Parameter
> Asm ("movl %0, %%ebx" & LF & HT &
>           "movl %%ebx, %1",
>           Inputs   => Unsigned_32'Asm_Input  ("g", Var_In),
>           Outputs  => Unsigned_32'Asm_Output ("=g", Var_Out),
>           Clobber  => "ebx",
>           Volatile => True);
> The actual Asm statement still is a quoted string. It is not Ada syntax.

I do not understand how it could possibly "[be] Ada syntax".

OP wanted to include an asm *routine*, I think, so perhaps what is
wanted instead is a pragma Import (Asm, ...)? (if suoported). You
could always write the asm routine using C calling conventions,
whatever they are (if different from asm) and use pragma Import (C,
...).

As always, and as others have said, RTFM!



       reply	other threads:[~2003-09-05 19:09 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <E19vIlZ-0002mO-Fg@punt-3.mail.demon.net>
2003-09-05 19:09 ` Simon Wright [this message]
2003-09-05 21:38   ` Ada and ASM Jerry van Dijk
2003-09-06  6:11     ` David Marceau
2003-09-07  7:18       ` sk
     [not found] <E19vQkV-0006EH-Ek@punt-3.mail.demon.net>
2003-09-06  7:25 ` Simon Wright
2003-09-06 13:14   ` Marin David Condic
2003-09-06 15:25   ` Wes Groleau
     [not found] <200309051909.h85J9Flb002351@smaug.pushface.org>
2003-09-06  0:15 ` Robert C. Leif
2003-09-04  7:47 luiX_
2003-09-04 11:43 ` David C. Hoos, Sr.
2003-09-04 15:07   ` Martin Krischik
2003-09-06  0:22   ` Freejack
2003-09-06  2:18     ` Jerry van Dijk
2003-09-06 12:59       ` Jeffrey Creem
2003-09-06 15:33         ` Wes Groleau
2003-09-06 17:11           ` Jerry van Dijk
2003-09-07  4:02             ` Wes Groleau
2003-09-06 17:16         ` Jerry van Dijk
2003-09-04 14:47 ` Martin Krischik
2003-09-04 15:08 ` Martin Krischik
2003-09-04 19:31 ` Leif Holmgren
2003-09-05  2:42   ` Robert C. Leif
2003-09-05 21:32   ` Jerry van Dijk
2003-09-23 10:45   ` Jacob Sparre Andersen
2003-09-05  5:46 ` Simon Wright
2003-09-05 15:44   ` Robert C. Leif
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox