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=-1.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,407c579dbfad5c2c X-Google-Attributes: gid103376,public From: Gautier Subject: Re: Parallel Port Date: 2000/03/20 Message-ID: <38D63BC7.2610C18A@maths.unine.ch>#1/1 X-Deja-AN: 599935286 Content-Transfer-Encoding: 7bit References: <172B4.2690$wl2.12638330@nnrp4.proxad.net> <036B4.16780$YU2.364519@typhoon.ne.mediaone.net> <38D61BAD.48BEFA30@shom.fr> X-Accept-Language: en Content-Type: text/plain; charset=us-ascii X-Trace: 20 Mar 2000 14:53:44 +0100, mac13-32.unine.ch Organization: Maths - Uni =?iso-8859-1?Q?Neuch=E2tel?= MIME-Version: 1.0 Newsgroups: comp.lang.ada Date: 2000-03-20T00:00:00+00:00 List-Id: > Ed Falis wrote: > > I don't see how this could have worked for either compiler, assuming x86 > > architecture without memory-mapped I/O (which can be inferred from the > > standard PC I/O space address used for the port base). Maybe one compiler does automatically translate these accesses to hardware addresses into in/out instructions and the other one doesn't... > > You need to use port I/O instructions to read and write these addresses. > > Take a look at Machine_Instructions_386. If you're running on NT or Win2K, > > it won't work in either case, because of OS hardware protection. > > - Ed Philippe BOURZEIX wrote: > So I can't do it on NT neither on Win98. A chance on dos ??? Yes but even on DOS you should use the inport/outport instructions ihmo. (ASM specialist there ?...) E.g. for VGA/SVGA palette: procedure Set_Color (Color : in Color_Type; Value : in RGB_Color) is begin Outport_Byte (16#3C8#, Unsigned_8 (Color)); Outport_Byte (16#3C9#, Unsigned_8 (Value.Red)); Outport_Byte (16#3C9#, Unsigned_8 (Value.Green)); Outport_Byte (16#3C9#, Unsigned_8 (Value.Blue)); end Set_Color; NB: DOS programs using such instructions are said (not tested myself) to run on NT, e.g. for a multi-key interrupt. NT maybe "firewalls" all these hardware accesses knowing they come from a DOS program. ______________________________________________________ Gautier -- http://members.xoom.com/gdemont/gsoft.htm