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.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM autolearn=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,e7f042c59351c9fb X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2001-06-21 16:38:37 PST Path: archiver1.google.com!newsfeed.google.com!sn-xit-02!sn-post-01!supernews.com!corp.supernews.com!not-for-mail From: "B. Douglas Hilton" Newsgroups: comp.lang.ada Subject: Re: hardware interfacing in linux with gnat Date: Thu, 21 Jun 2001 19:43:24 -0400 Organization: Posted via Supernews, http://www.supernews.com Message-ID: <3B32869C.58CC7CC5@engineer.com> X-Mailer: Mozilla 4.75 [en] (X11; U; Linux 2.4.3 i686) X-Accept-Language: en MIME-Version: 1.0 References: <3B326D90.5475F1E3@hccnet.nl> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Complaints-To: newsabuse@supernews.com Xref: archiver1.google.com comp.lang.ada:9014 Date: 2001-06-21T19:43:24-04:00 List-Id: 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 > )