comp.lang.ada
 help / color / mirror / Atom feed
From: Stephen Leake <Stephen.Leake@gsfc.nasa.gov>
Subject: Re: low-level
Date: 1998/04/13
Date: 1998-04-13T00:00:00+00:00	[thread overview]
Message-ID: <35324FDE.68B0@gsfc.nasa.gov> (raw)
In-Reply-To: 01bd66bc$73c7ca40$beda4cc3@carlos


Carlos Piqueres Ayela wrote:
> 
> I'm using GNAT 3.10 and Windows 95.
> I'm using the Jerry Van Dijk 's  great Adagraph package to do simple
> graphics.
> 
> But what I want to know is how you can access directly to the hardware (for
> example the SVGA hardware, BIOS interrupts...) for writing your own routins
> (graphics, hardware drivers...).
> 
> Not doing it in C and interfacing with ADA programs, just doing it in ADA.
> I know that you can do such things in C with far pointers, library
> functions  (int86()...) and things like that.
> Is there any equivalent to that in ADA ??

Just call the same library from Ada that you would from C. You'll have
to write the equivalent Ada declaration, and add pragma Import instead
of the body.

Note that this is exactly equivalent to how you call a library function
from C; you need the equivalent C declaration, and you tell the linker
to include the library.

The fact that you first learned about the library functions in a C
context, and that the documentation provided with the library provides C
declarations, doesn't mean calling it from Ada is somehow non-Ada!

As for far pointers, all current Ada environments for the PC are 32bit,
so there is only addresses, not near and far addresses.

> 
> Carlos.

-- 
- Stephe




  parent reply	other threads:[~1998-04-13  0:00 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1998-04-13  0:00 low-level Carlos Piqueres Ayela
1998-04-13  0:00 ` low-level Tom Moran
1998-04-13  0:00 ` low-level Jerry van Dijk
1998-04-13  0:00 ` Stephen Leake [this message]
1998-04-14  0:00   ` low-level Albert K. Lee
replies disabled

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