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.3 required=5.0 tests=BAYES_00, REPLYTO_WITHOUT_TO_CC 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-7-bit Path: g2news1.google.com!news2.google.com!news.glorb.com!wn11feed!worldnet.att.net!bgtnsc05-news.ops.worldnet.att.net.POSTED!53ab2750!not-for-mail Newsgroups: comp.lang.ada From: anon@anon.org (anon) Subject: Re: Port IO with Gnat Reply-To: no to spamers (No@email.given.org) References: <6e0427b4-4871-4e51-a1b1-696136aa45a6@i20g2000prf.googlegroups.com> X-Newsreader: IBM NewsReader/2 2.0 Message-ID: Date: Sun, 31 Aug 2008 21:06:23 GMT NNTP-Posting-Host: 12.64.210.124 X-Complaints-To: abuse@worldnet.att.net X-Trace: bgtnsc05-news.ops.worldnet.att.net 1220216783 12.64.210.124 (Sun, 31 Aug 2008 21:06:23 GMT) NNTP-Posting-Date: Sun, 31 Aug 2008 21:06:23 GMT Organization: AT&T Worldnet Xref: g2news1.google.com comp.lang.ada:1849 Date: 2008-08-31T21:06:23+00:00 List-Id: -- 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-696136aa45a6@i20g2000prf.googlegroups.com>, levy.david.c@gmail.com writes: >Could anyone point me at how to do simple port IO under Windows XP >with GNAT 2005? > >Thanks > >Dave