comp.lang.ada
 help / color / mirror / Atom feed
From: levy.david.c@gmail.com
Subject: Re: Port IO with Gnat
Date: Thu, 25 Sep 2008 17:34:44 -0700 (PDT)
Date: 2008-09-25T17:34:44-07:00	[thread overview]
Message-ID: <de90dcd1-8540-446b-9926-06d671416736@i20g2000prf.googlegroups.com> (raw)
In-Reply-To: jJDuk.192246$102.40455@bgtnsc05-news.ops.worldnet.att.net

On Sep 1, 7:06 am, a...@anon.org (anon) wrote:
> -- There is a workable example in the gnat doc that comes with GNAT.
> -- But these you routine should give you and idea.  
>
> --
> --  If your using x86 processors
> --
> procedure Out_Byte ( Port : unsigned_16 ;
>                        Data : unsigned_8 ) is
>
>   begin -- Out_Byte
>     Asm ( Template => "outb %%al, %%dx"  & ASCII.LF,
>           Inputs => ( Unsigned_8'Asm_Input ( "a", Data ),
>                       Unsigned_16'Asm_Input ( "d", Port )
>                       ),
>           Volatile => True ) ;
>   end Out_Byte ;
>
> function In_Byte ( Port : unsigned_16 ) return unsigned_8 is
>
>     Data : unsigned_8 ;
>
>   begin -- In_Byte
>     Asm ( Template => "inb  %%dx, %%al"  & ASCII.LF,
>           Inputs   =>  Unsigned_16'Asm_Input ( "d", Port ),
>           Outputs => Unsigned_8'Asm_Output ( "=a", Data ),
>           Volatile => True ) ;
>     return Data ;
>   end In_Byte ;
>
> In <6e0427b4-4871-4e51-a1b1-696136aa4...@i20g2000prf.googlegroups.com>,levy.davi...@gmail.com writes:
> >Could anyone point me at how to do simple port IO under Windows XP
> >with GNAT 2005?
>
> >Thanks
>
> >Dave
>
>

Unfortunately this does not work because of Windows XP's security,
which disallows port io.

How does one ask XP for permission to do the port IO from GNAT?

Thanks

Dave



  reply	other threads:[~2008-09-26  0:34 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-08-31 13:15 Port IO with Gnat levy.david.c
2008-08-31 21:06 ` anon
2008-09-26  0:34   ` levy.david.c [this message]
2008-09-26  1:32     ` Steve
2008-09-26  3:32       ` anon
2008-09-01 12:41 ` Stephen Leake
2008-09-01 14:50   ` Gary Scott
replies disabled

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