From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-0.9 required=5.0 tests=BAYES_00,FORGED_GMAIL_RCVD, FREEMAIL_FROM autolearn=no autolearn_force=no version=3.4.4 X-Google-Thread: 103376,598cad53c05b3289 X-Google-Attributes: gid103376,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII Path: g2news2.google.com!postnews.google.com!i20g2000prf.googlegroups.com!not-for-mail From: levy.david.c@gmail.com Newsgroups: comp.lang.ada Subject: Re: Port IO with Gnat Date: Thu, 25 Sep 2008 17:34:44 -0700 (PDT) Organization: http://groups.google.com Message-ID: References: <6e0427b4-4871-4e51-a1b1-696136aa45a6@i20g2000prf.googlegroups.com> NNTP-Posting-Host: 129.78.220.7 Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Trace: posting.google.com 1222389284 12990 127.0.0.1 (26 Sep 2008 00:34:44 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Fri, 26 Sep 2008 00:34:44 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: i20g2000prf.googlegroups.com; posting-host=129.78.220.7; posting-account=aOd9pQoAAACeoUmGbl-PsFsq_qdRYJXv User-Agent: G2/1.0 X-HTTP-UserAgent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-GB; rv:1.9.0.2) Gecko/2008091620 Firefox/3.0.2,gzip(gfe),gzip(gfe) X-HTTP-Via: 1.0 www-cacheD.usyd.edu.au:8080 (squid/2.6.STABLE5) Xref: g2news2.google.com comp.lang.ada:7819 Date: 2008-09-25T17:34:44-07:00 List-Id: On Sep 1, 7:06=A0am, 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. =A0 > > -- > -- =A0If your using x86 processors > -- > procedure Out_Byte ( Port : unsigned_16 ; > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0Data : unsigned_8 ) is > > =A0 begin -- Out_Byte > =A0 =A0 Asm ( Template =3D> "outb %%al, %%dx" =A0& ASCII.LF, > =A0 =A0 =A0 =A0 =A0 Inputs =3D> ( Unsigned_8'Asm_Input ( "a", Data ), > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 Unsigned_16'Asm_Input ( "d", = Port ) > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 ), > =A0 =A0 =A0 =A0 =A0 Volatile =3D> True ) ; > =A0 end Out_Byte ; > > function In_Byte ( Port : unsigned_16 ) return unsigned_8 is > > =A0 =A0 Data : unsigned_8 ; > > =A0 begin -- In_Byte > =A0 =A0 Asm ( Template =3D> "inb =A0%%dx, %%al" =A0& ASCII.LF, > =A0 =A0 =A0 =A0 =A0 Inputs =A0 =3D> =A0Unsigned_16'Asm_Input ( "d", Port = ), > =A0 =A0 =A0 =A0 =A0 Outputs =3D> Unsigned_8'Asm_Output ( "=3Da", Data ), > =A0 =A0 =A0 =A0 =A0 Volatile =3D> True ) ; > =A0 =A0 return Data ; > =A0 end In_Byte ; > > In <6e0427b4-4871-4e51-a1b1-696136aa4...@i20g2000prf.googlegroups.com>,le= vy.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