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=2.9 required=5.0 tests=BAYES_50,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,e9b2ad3cac4d4266 X-Google-Attributes: gid103376,public From: Matthew Kennedy Subject: Re: Low level (GNAT) Ada? Date: 1998/01/22 Message-ID: <34C716EC.7F0D@mail.connect.usq.edu.au>#1/1 X-Deja-AN: 318289940 Content-Transfer-Encoding: 7bit References: <34C48A74.26CA@mail.connect.usq.edu.au> <885450093.13snx@jvdsys.nextjk.stuyts.nl> Mime-Version: 1.0 Reply-To: q9522772@mail.connect.usq.edu.au Content-Type: text/plain; charset=us-ascii Organization: University of Southern Queensland Newsgroups: comp.lang.ada Date: 1998-01-22T00:00:00+00:00 List-Id: OK, I need to write a device driver, no worries! Can I write it with GNAT? I know these things are usually written in assembler but I'm not really wanting anything that special. Afterall it's only talking to a logger and another PC terminal. What about those DLL files in the system directory. I know there is a DLL for Visual C/Basic that is specifically for serial communications. How does one reference a DLL entry into a GNAT Ada program? By the way, I'd rather not use DOS. Many thanks, Matt Jerry van Dijk wrote: > > In article <34C48A74.26CA@mail.connect.usq.edu.au> q9522772@mail.connect.usq.edu.au writes: > > >I'd like to be able to control some purpose-built devices on the > >parallel and serial ports of my PC as well as bus cards. > > Not unusual... > > > I have searched > >hard through the documentation for a library that provides > >parallel/serial interfaces but they just don't exist. I haven't even > >found basic C-like outb/inb functions. > > That is correct, although this has nothing to do with Ada or GNAT. > To access devices in NT your code has to run at ring 0, which means > you need a device driver for them. > > Note that you can open I/O devices as files. > > >Everybody keeps saying that Ada is also great for system and low level > >programming but it doesn't look like it from the Windows GNAT point of > >view. > > Yes, Ada is very good at low-level programming, No, NT does not allow > you to do so in a user program. Neither can you do this in C. > > Dare I say it... Yep: the easiest way to do this sort of programming > is to use a DOS compiler. -- Matthew Kennedy Student of Electrical and Electronics Engineering University of Southern Queensland, Australia "When will you realise you're already there?" - Marilyn Manson