comp.lang.ada
 help / color / mirror / Atom feed
From: "B. Douglas Hilton" <doug.hilton@engineer.com>
Subject: Re: hardware interfacing in linux with gnat
Date: Thu, 21 Jun 2001 19:43:24 -0400
Date: 2001-06-21T19:43:24-04:00	[thread overview]
Message-ID: <3B32869C.58CC7CC5@engineer.com> (raw)
In-Reply-To: 3B326D90.5475F1E3@hccnet.nl

Perhaps you could just use pure inline assembly to use the card,
that's what I would do. X86 assembly really isn't all that mysterious.
Small inline ASM routines are pretty cool, and unless I am mistaken
Ada95 pushes your registers and such onto the stack so you have
free reign other than you must not modify CS or DS and probably
a couple other registers. To return values you just push it onto the
stack ( I think ). I have used inline ASM with C, but not yet Ada,
so I'm guessing here, but I know it can easily be done.

- Doug

Jaap van Erk wrote:

> this card can be steered with io adresses 792 to 800 (decimal).
> In C we use the inb and outb commands (see the io-port mini howto)
> Because we must also use ioperm(), and a optimizing flag -O we can
> access the hardware in linux.
>
> I tried Jerry van Dijk's clock.adb program to do it also; it's compiling
>
> without errors, but it give a coredump when accessing the ports.
> How can I use ioperm() in gnat?  (3.11 for linux 2.0 and 3.13 for 2.2)
> clock.adb works ok when i'm using Dos.(Bedankt, Jerry voor dit programma
> )




  reply	other threads:[~2001-06-21 23:43 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-06-21 21:56 hardware interfacing in linux with gnat Jaap van Erk
2001-06-21 23:43 ` B. Douglas Hilton [this message]
2001-06-22 14:34   ` Jerry van Dijk
2001-06-22 14:32 ` Jerry van Dijk
replies disabled

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