comp.lang.ada
 help / color / mirror / Atom feed
From: "Jerry van Dijk" <jvandyk@ibm.net>
Subject: Re: question re Ada equivalent of C function
Date: 1998/02/21
Date: 1998-02-21T00:00:00+00:00	[thread overview]
Message-ID: <01bd3f1d$44728800$582c5c8b@aptiva> (raw)
In-Reply-To: Pine.BSF.3.96.980221115827.17781A-100000@shell5.ba.best.com


> > What are the Ada equivalents of the C functions, inp and outp, used to
> > read a byte from or send one to a memory address?

> Mem_Addr : constant Address := To_Address(16#CAFEBABE#);
> Mem_Mapped_Char : Character;
> for Mem_Mapped_Char'Address use Mem_Addr;

Careful, that would depend on the processor. On a x86 the I/O ports
are not in the regular address space, that's why C compilers for PC's
often have a separate library functions to access them.

If the original question was indeed refering to a PC environment, then
the answer will depend on the specific compiler and OS used.

Jerry,





  parent reply	other threads:[~1998-02-21  0:00 UTC|newest]

Thread overview: 36+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1998-02-21  0:00 question re Ada equivalent of C function David Fisher
1998-02-21  0:00 ` Brian Rogoff
1998-02-21  0:00   ` Robert Dewar
1998-02-22  0:00     ` Brian Rogoff
1998-02-21  0:00   ` Jerry van Dijk [this message]
1998-02-21  0:00     ` David Fisher
1998-02-22  0:00       ` Simon Wright
1998-02-22  0:00         ` Simon Wright
1998-02-22  0:00       ` Jerry van Dijk
1998-02-22  0:00         ` Robert Dewar
1998-02-22  0:00           ` Andi Kleen
1998-02-22  0:00   ` Nick Roberts
1998-02-22  0:00     ` frc
1998-02-21  0:00 ` Robert Dewar
1998-02-21  0:00 ` Corey Ashford
1998-02-22  0:00   ` Nick Roberts
1998-02-22  0:00 ` Larry Kilgallen
1998-02-22  0:00   ` frc
1998-02-22  0:00     ` Linux/POSIX packages for GNAT Markus Kuhn
1998-02-22  0:00       ` Andi Kleen
1998-02-22  0:00         ` Markus Kuhn
1998-02-22  0:00           ` Robert Dewar
1998-02-22  0:00         ` Samuel Tardieu
1998-02-23  0:00           ` Nick Roberts
1998-02-23  0:00             ` Samuel Tardieu
1998-03-05  0:00             ` Testing exception handlers James M. Darlack
1998-02-22  0:00       ` Linux/POSIX packages for GNAT Robert Dewar
1998-02-23  0:00         ` Markus Kuhn
1998-02-23  0:00           ` Robert Dewar
1998-02-23  0:00             ` Markus Kuhn
1998-02-24  0:00               ` question re Ada equivalent of C function Dale Stanbrough
1998-02-23  0:00         ` Linux/POSIX packages for GNAT Andi Kleen
1998-02-22  0:00           ` Robert Dewar
1998-02-23  0:00             ` Markus Kuhn
1998-02-23  0:00               ` Robert Dewar
1998-02-22  0:00   ` question re Ada equivalent of C function Robert Dewar
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox