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!wn14feed!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> <3aydnfE84t4XpkHVnZ2dnUVZ_uqdnZ2d@comcast.com> X-Newsreader: IBM NewsReader/2 2.0 Message-ID: Date: Fri, 26 Sep 2008 03:32:00 GMT NNTP-Posting-Host: 12.65.12.36 X-Complaints-To: abuse@worldnet.att.net X-Trace: bgtnsc05-news.ops.worldnet.att.net 1222399920 12.65.12.36 (Fri, 26 Sep 2008 03:32:00 GMT) NNTP-Posting-Date: Fri, 26 Sep 2008 03:32:00 GMT Organization: AT&T Worldnet Xref: g2news1.google.com comp.lang.ada:2096 Date: 2008-09-26T03:32:00+00:00 List-Id: It depends on the XP or Vista security mode. With the security mode active a program must request and be granted rights to use the I/O instructions. Check Win security apps for those routines. Once rights have been granted the routines works perfectly. But, if the OS does not give the rights then a "System I/O Access" exception will occur if you try to execute any I/O instruction. There are other ways (hacked) but microsoft and some schools do not support those and it may void any hardware warranties on new equipment or get one expelled. But in either case, you will need to write an Ada Interface package to import those routines to Ada. In <3aydnfE84t4XpkHVnZ2dnUVZ_uqdnZ2d@comcast.com>, "Steve" writes: > wrote in message >news:de90dcd1-8540-446b-9926-06d671416736@i20g2000prf.googlegroups.com... >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 ) >[snip] > >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 > >A quick search on "port io from xp" (on ixquick) finds: > >http://www.geekhideout.com/iodll.shtml > >There is an IO.DLL that does the grubby work for you, so all you have to do >is use the DLL. > >Regards, >Steve > >BTW: Some times my newsreader (outlook express) doesn't qoute replies >properly (sometimes it does)... sorry > >