comp.lang.ada
 help / color / mirror / Atom feed
From: Jacob Sparre Andersen <jacob@jacob-sparre.dk>
Subject: Re: Ada asm
Date: Sun, 10 Jul 2016 17:06:10 +0200
Date: 2016-07-10T17:06:10+02:00	[thread overview]
Message-ID: <87r3b1ednh.fsf@adaheads.consafe1.org> (raw)
In-Reply-To: 62f6046a-fea2-4478-ab57-8fef3b0cd426@googlegroups.com

ma740988@gmail.com writes:

> 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 don't know enough about C++ machine code insertion, but the Ada
definitions can be found in section 13.8 in the Ada Reference Manual,
and the implementation specifics for GCC can be found in the GNAT
Reference Manual
(https://gcc.gnu.org/onlinedocs/gnat_rm/Machine-Code-Insertions.html#Machine-Code-Insertions).

> I'm relatively new to Ada but I saw a link that describe the => as a
> positional notation.

That's a mistake.  Using "=>" is named notation.  Just listing values in
a comma-separated list is positional notation.

Greetings,

Jacob
-- 
Better save than sorry!

      parent reply	other threads:[~2016-07-10 15:06 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
2016-07-10 15:06 ` Jacob Sparre Andersen [this message]
replies disabled

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