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: <38D6B733.A14EA38A@maths.unine.ch>#1/1 X-Deja-AN: 600133498 Content-Transfer-Encoding: 7bit References: <172B4.2690$wl2.12638330@nnrp4.proxad.net> <036B4.16780$YU2.364519@typhoon.ne.mediaone.net> <38D61BAD.48BEFA30@shom.fr> <38D63BC7.2610C18A@maths.unine.ch> <38d68bba_1@news2.prserv.net> X-Accept-Language: en Content-Type: text/plain; charset=us-ascii X-Trace: 20 Mar 2000 23:40:17 +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: Jerry van Dijk wrote: > > Yes but even on DOS you should use the inport/outport instructions ihmo. > > (ASM specialist there ?...) > If a specialist is lacking, one could try my GNAT inline (x86) ASM tutorial, > to be found on adapower... And whose contents have spread at many places - oh! below too... But the ASM question is: "to move or to outb ?"... G. --------------------------- -- Access hardware ports -- --------------------------- -------------------------------------------------------------------- function Inport_Byte (Port : Unsigned_16) return Unsigned_8 is Value : Unsigned_8; begin ASM ("inb %%dx", Unsigned_8'Asm_Output ("=a", Value), Unsigned_16'Asm_Input ("d", Port), Volatile => True); return Value; end Inport_Byte; pragma Inline (Inport_Byte); -------------------------------------------------------------------- procedure Outport_Byte (Port : in Unsigned_16; Value : in Unsigned_8) is begin ASM ("outb %%dx", No_Output_Operands, (Unsigned_8'Asm_Input ("a", Value), Unsigned_16'Asm_Input ("d", Port))); end Outport_Byte; pragma Inline (Outport_Byte);