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.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,1dca1cee347390dd,start X-Google-Attributes: gid103376,public From: Rich Maggio Subject: DOS interrupts with GNAT 3.04 Date: 1996/12/21 Message-ID: #1/1 X-Deja-AN: 205208078 x-nntp-posting-host: i123.226.world2u.com x-nntp-posting-user: (Unauthenticated) content-type: text/plain; charset=us-ascii x-trace: 851136494/19766 organization: Rich Maggio mime-version: 1.0 newsgroups: comp.lang.ada x-mailer: Mozilla 2.01KIT (Win95; U) Date: 1996-12-21T00:00:00+00:00 List-Id: 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