comp.lang.ada
 help / color / mirror / Atom feed
* DOS interrupts with GNAT 3.04
@ 1996-12-21  0:00 Rich Maggio
  1996-12-23  0:00 ` Gautier
  0 siblings, 1 reply; 8+ messages in thread
From: Rich Maggio @ 1996-12-21  0:00 UTC (permalink / raw)



I am wondering if there are any provisions (aside from interfacing to another 
programming language) in this Ada compiler to access the software interrupts
in DOS.  The reason is this: by doing this, it would be very simple to put 
together a package to perform nice screen output - cursor positioning, 
character attributes, etc.  As a C programmer, I made it a habit not to rely
on libraries provided by the compiler for this since this leads to non protable
code.  I would like to do the same with my Ada code.  I know that you can interface
Ada with code written in other programming languages, but that would seem to 
me to be a last resort.  If I am primarily (hypothetical) an Ada programmer,
why should I have to resort to C?  

The reason that I ask this is that I was poking around some of the ADS files 
and found that there are provisions to create interrupts handlers.  Since
there is support for this, I thought that there must be support for 
the reverse - generating interrupts (software or otherwise).

One creative idea that I saw (in Michael Feldman's Ada 95 book) was to make
use of "escape sequences" that would be caught by ANSI.SYS and perform
screen positioning and such.  This is good for screen I/O stuff, but there are
many other services in DOS that can be accessed through the software interrupt
mechanism.

On the same note, is it possible to create the equivalent of a FAR pointer
to interface directly to regions in memory - for example video RAM?

Any input would be welcomed.  I realize that these questions are not specific
the the Ada language itself, but these are real world situations that many
Ada programmers (novice and experienced) must face.  I am just trying to get a 
feel for what the capabilities of GNAT are and what the "Ada way" is for certain
situations. 

Thanks in advance for your help.

Rich Maggio





^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~1996-12-25  0:00 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1996-12-21  0:00 DOS interrupts with GNAT 3.04 Rich Maggio
1996-12-23  0:00 ` Gautier
1996-12-24  0:00   ` Michael F Brenner
1996-12-25  0:00     ` Jerry van Dijk
1996-12-24  0:00   ` Robert Dewar
1996-12-25  0:00     ` Jerry van Dijk
1996-12-25  0:00       ` Robert Dewar
1996-12-25  0:00       ` Robert Dewar

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