comp.lang.ada
 help / color / mirror / Atom feed
From: "Tarjei Tj�stheim Jensen" <tarjei.jensen@kvaerner.no>
Subject: Re: Low Level IO
Date: 1998/08/07
Date: 1998-08-07T00:00:00+00:00	[thread overview]
Message-ID: <6qel83$j11@news.kvaerner.com> (raw)
In-Reply-To: 6qclfg$dpt$2@talia.mad.ibernet.es


JOSE VICENTE wrote :
>Does anyone know how can I read/write the parallel port using Linux and Gnat
>3.10 ?
>I've been trying things like this and 'Storage Error' or 'Program Error'
>raises.
>    ......
>    type Byte is mod 2**8;
>    for Byte'Size use 8;
>    Parallel_Port:Byte;
>    for Parallel_Port'Address use
>System.Storage_Elements.To_Address(16#3BC#);
>    ......
>    begin
>    ......
>    Parallel_Port:=value;    -- The exception raises at this point.


I believe that you are trying to write into the BIOS area.

To my knowledge the paralell port lives in I/O space. I/O space is different
from program/data space. You should use something similar to the port()
function which many C compilers have. It may very well be that this can be done
using assembly language insertion. Robert Dewar can probably tell you the
preferred method.

It may well be that this is documentet in the GNAT documentation. Please have a
go at looking it up there first.

Greetings,






      parent reply	other threads:[~1998-08-07  0:00 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1998-08-06  0:00 Low Level IO JOSE VICENTE
1998-08-06  0:00 ` Samuel Tardieu
1998-08-06  0:00   ` JOSE VICENTE
1998-08-07  0:00 ` Tarjei Tj�stheim Jensen [this message]
replies disabled

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