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=0.2 required=5.0 tests=BAYES_00,INVALID_MSGID, REPLYTO_WITHOUT_TO_CC autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,be1cad394fc8713f X-Google-Attributes: gid103376,public From: Stephen Leake Subject: Re: low-level Date: 1998/04/13 Message-ID: <35324FDE.68B0@gsfc.nasa.gov>#1/1 X-Deja-AN: 343653105 Content-Transfer-Encoding: 7bit References: <01bd66bc$73c7ca40$beda4cc3@carlos> Mime-Version: 1.0 Reply-To: Stephen.Leake@gsfc.nasa.gov Content-Type: text/plain; charset=us-ascii Organization: NASA Goddard Space Flight Center -- Greenbelt, Maryland USA Newsgroups: comp.lang.ada Date: 1998-04-13T00:00:00+00:00 List-Id: 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