comp.lang.ada
 help / color / mirror / Atom feed
From: dewar@merv.cs.nyu.edu (Robert Dewar)
Subject: Re: Is this ground dead? Also, info on Mach that's more recent
Date: 1998/01/17
Date: 1998-01-17T00:00:00+00:00	[thread overview]
Message-ID: <dewar.885087293@merv> (raw)
In-Reply-To: 69rdmb$j29$1@encore.ece.cmu.edu


David says

<<I'm somewhat confused as to how Ada can be "natural" for device
drivers and systems programming.  For example, how do I code a task
switch or set up a DMA channel to a device in Ada?  Relying on a
library written in anything but Ada doesn't count.

Of course, I have no idea how I'd do that in C or C++, either, without
relying on nasty tricks like relying on assumptions about the
compiler's code generation and purposely breaking the type system.
>>

Well if you look at chapter 13 and annex C in the RM, you wlil find lots
of useful stuff for writing low level code, Ada is (perhaps surprisingly
to some) better equipped for low level programming of this kind than C
(for example, the ability to lay out records precisely by bit numbers,
the ability to define interrupt routines, the ability to specify where
in memory declared variables are located etc).

Of course at some level, you may need to escape into assembler in either
language. Here Ada again is ahead of C, a full implementation of Ada is
*required* to provide an escape to assembler (either with intrinsics or
with package machine_Code). Of course a C compiler *may* provide this
important capability, but an Ada compiler MUST provide it (if it fully
implements the language).






  reply	other threads:[~1998-01-17  0:00 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <34AE2AE8.ED17B2C6@gildea.net>
     [not found] ` <5l3eir6lvj.fsf@tequila.systemsz.cs.yale.edu>
     [not found]   ` <69j8u6$spl$1@encore.ece.cmu.edu>
     [not found]     ` <5lzpky66rq.fsf@tequila.systemsz.cs.yale.edu>
     [not found]       ` <69jr4q$44j$1@encore.ece.cmu.edu>
1998-01-17  0:00         ` Is this ground dead? Also, info on Mach that's more recent Thomas G. McWilliams
1998-01-17  0:00           ` David A. Cuthbert
1998-01-17  0:00             ` Robert Dewar [this message]
1998-01-19  0:00               ` vonhend
1998-01-19  0:00                 ` Robert Dewar
1998-01-19  0:00             ` Anonymous
1998-01-19  0:00               ` feladdress.peter
1998-01-19  0:00                 ` Robert Dewar
1998-01-20  0:00                 ` Is this ground dead? Also, info on Mach that's more rec Jerry van Dijk
1998-01-20  0:00                 ` Is this ground dead? Also, info on Mach that's more recent Christopher Browne
1998-01-22  0:00                 ` Compile-time type checking Nick Roberts
replies disabled

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