comp.lang.ada
 help / color / mirror / Atom feed
From: Jeremiah <jeremiah.breeden@gmail.com>
Subject: Re: Ada asm
Date: Fri, 8 Jul 2016 20:35:50 -0700 (PDT)
Date: 2016-07-08T20:35:50-07:00	[thread overview]
Message-ID: <c47626a1-ec75-492a-87f3-51c9fbc1a523@googlegroups.com> (raw)
In-Reply-To: <62f6046a-fea2-4478-ab57-8fef3b0cd426@googlegroups.com>

On Friday, July 8, 2016 at 11:28:58 PM UTC-4, ma74...@gmail.com wrote:
> Debated if I should post my question in comp.lang.c++ but opted for comp.lang.ada instead.  I'm perusing Ada code and I'm trying to determine the C++ equivalents for the following:
> 
> 
>     asm'( ldf => "set_test_reg:");
> 
> 
>     --
>     -- Set System MFT Address Register located at 0x00AD)
>     --
>     asm'( ldf => "mtmft 0x00AD, r1"); 
> 
> 
> I'm relatively new to Ada but I saw a link that describe the => as a positional notation.   It's not clear what the relationship between ldf and set_test_reg is.   I suspect ldf is passed into set_test_reg ..who knows.   I perused this guideline - link below but still unclear that the C++ equivalent might be.  Any help appreciated.
> 
> http://www.ibm.com/developerworks/rational/library/inline-assembly-c-cpp-guide/

It looks like it is equivalent to basic inline assembly in GCC:
https://www.ibiblio.org/gferg/ldp/GCC-Inline-Assembly-HOWTO.html#s4

As opposed to extended assembly you have listed in the guide you posted


  reply	other threads:[~2016-07-09  3:35 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-07-09  3:28 Ada asm ma740988
2016-07-09  3:35 ` Jeremiah [this message]
2016-07-10 15:06 ` Jacob Sparre Andersen
replies disabled

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