comp.lang.ada
 help / color / mirror / Atom feed
* NT kernel-mode device drivers in Ada?
@ 1997-06-01  0:00 Mike D Bates
  1997-06-01  0:00 ` Larry Kilgallen
                   ` (5 more replies)
  0 siblings, 6 replies; 10+ messages in thread
From: Mike D Bates @ 1997-06-01  0:00 UTC (permalink / raw)



Could use some help in answering yet another objection to Ada.  Has
anyone here successfully implemented an NT kernel-mode device driver.
A FAQ on the subject (http://www.cmkrnl.com/faq.html) says that using
anything but C for this purpose would be like swimming upstream with a
brick in each hand.  Can anyone cite experience to the contrary?

Mike Bates


-- 
Pursuant to US Code, Title 47, Chapter 5, Subchapter II, Section 227, any and
all nonsolicited commercial E-mail sent to this address is subject to a
download and archival fee in the amount of $500 US.  E-mailing denotes
acceptance of these terms.




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

* Re: NT kernel-mode device drivers in Ada?
  1997-06-01  0:00 NT kernel-mode device drivers in Ada? Mike D Bates
@ 1997-06-01  0:00 ` Larry Kilgallen
  1997-06-01  0:00   ` Mike D Bates
  1997-06-01  0:00 ` Dale Stanbrough
                   ` (4 subsequent siblings)
  5 siblings, 1 reply; 10+ messages in thread
From: Larry Kilgallen @ 1997-06-01  0:00 UTC (permalink / raw)



In article <5mr324$8im@ion1.ionet.net>, mbates@ionet.net (Mike D Bates) writes:
> Could use some help in answering yet another objection to Ada.  Has
> anyone here successfully implemented an NT kernel-mode device driver.
> A FAQ on the subject (http://www.cmkrnl.com/faq.html) says that using
> anything but C for this purpose would be like swimming upstream with a
> brick in each hand.  Can anyone cite experience to the contrary?

I know the proprietor of http://www.cmkrnl.com to be quite expert
in the area of NT kernel-mode device drivers, perhaps more so than
anyone who is not a Microsoft employee.

It is possible you could solicit from him a short "what would it take"
list for reposting here so that we may get a better description of the
bricks.

Larry Kilgallen




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

* Re: NT kernel-mode device drivers in Ada?
  1997-06-01  0:00 NT kernel-mode device drivers in Ada? Mike D Bates
  1997-06-01  0:00 ` Larry Kilgallen
@ 1997-06-01  0:00 ` Dale Stanbrough
  1997-06-02  0:00 ` Simon Wright
                   ` (3 subsequent siblings)
  5 siblings, 0 replies; 10+ messages in thread
From: Dale Stanbrough @ 1997-06-01  0:00 UTC (permalink / raw)



Mike D Bates writes:

"A FAQ on the subject (http://www.cmkrnl.com/faq.html) says that using
 anything but C for this purpose would be like swimming upstream with a
 brick in each hand.  Can anyone cite experience to the contrary?"

I got the impression that using a _development environment_ other than
Microsoft's would be swimming..., because of the 'effort that MS puts into
their Visual C++ product'

About using other languages he says that you would have to convert the
header files into your own language (which he presumably considers hard work).

Dale




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

* Re: NT kernel-mode device drivers in Ada?
  1997-06-01  0:00 ` Larry Kilgallen
@ 1997-06-01  0:00   ` Mike D Bates
  0 siblings, 0 replies; 10+ messages in thread
From: Mike D Bates @ 1997-06-01  0:00 UTC (permalink / raw)



In article <1997Jun1.081747.1@eisner>,
Larry Kilgallen <kilgallen@eisner.decus.org> wrote:
>In article <5mr324$8im@ion1.ionet.net>, mbates@ionet.net (Mike D Bates) writes:
>> Could use some help in answering yet another objection to Ada.  Has
>> anyone here successfully implemented an NT kernel-mode device driver.
>> A FAQ on the subject (http://www.cmkrnl.com/faq.html) says that using
>> anything but C for this purpose would be like swimming upstream with a
>> brick in each hand.  Can anyone cite experience to the contrary?
>
>I know the proprietor of http://www.cmkrnl.com to be quite expert
>in the area of NT kernel-mode device drivers, perhaps more so than
>anyone who is not a Microsoft employee.
>
>It is possible you could solicit from him a short "what would it take"
>list for reposting here so that we may get a better description of the
>bricks.
>Larry Kilgallen

Here are the relevant paragraphs from the FAQ.  2.2.3 seems to spell
out the "what would it take".  Based on past experience writing device
drivers in Ada (under VAXELN), it seems right.  You have to present the
OS with an interrupt handler with the right calling profile.  I suspect
the ability to do this is contained within the language interoperability
features of an Ada compiler.  I would also guess that you wouldn't need
to translate all of \DDK\INC, just the bits that matter for your driver.

  2.2.2  Can't I use someone else's 32-bit C compiler?
  
  Maybe.  The technical answer is:  As long as it generates essentially
  the same code, supports all of the MS extensions to C, and takes all of
  the same command line options, it should work fine.  Same for the
  linker.
  
  Opinion:  VC++ is part of the driver build environment supported by MS,
  and using anything else feels too much to me like swimming upstream with
  a brick in each hand, a practice I try to avoid.
  
  2.2.3  What about other languages like Pascal?
  
  In theory, as long as you adhere to C calling conventions, don't use too
  much stack space, etc., you should be fine.  In practice, there are
  several tens of thousands of lines of header files in \DDK\INC which you
  will have to translate to your language of choice.
  
  2.3  What's this about C++ and drivers?
  
  Although we use the VC++ compiler to compile drivers, MS has stated many
  times that C++ language extensions should not be used in writing NT
  drivers.  It is true that a few people have written about their
  successes in using C++.  However, C++ language features tend to use
  large amounts of stack space, and large amounts of stack space are not
  available under WNT in kernel mode.

Mike Bates

-- 
Pursuant to US Code, Title 47, Chapter 5, Subchapter II, Section 227, any and
all nonsolicited commercial E-mail sent to this address is subject to a
download and archival fee in the amount of $500 US.  E-mailing denotes
acceptance of these terms.




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

* Re: NT kernel-mode device drivers in Ada?
  1997-06-01  0:00 NT kernel-mode device drivers in Ada? Mike D Bates
  1997-06-01  0:00 ` Larry Kilgallen
  1997-06-01  0:00 ` Dale Stanbrough
@ 1997-06-02  0:00 ` Simon Wright
  1997-06-02  0:00 ` Steve O'Neill
                   ` (2 subsequent siblings)
  5 siblings, 0 replies; 10+ messages in thread
From: Simon Wright @ 1997-06-02  0:00 UTC (permalink / raw)



mbates@ionet.net (Mike D Bates) writes:

> Could use some help in answering yet another objection to Ada.  Has
> anyone here successfully implemented an NT kernel-mode device driver.
> A FAQ on the subject (http://www.cmkrnl.com/faq.html) says that using
> anything but C for this purpose would be like swimming upstream with a
> brick in each hand.  Can anyone cite experience to the contrary?

No experience, but -

* in a Unix environment, device drivers only communicate with
applications through the standard system interfaces (open, close,
ioctl, read, write, ..) so the language used has zero impact on the
applications, and you should use whatever gets the job done best; I
expect NT is the same?

* part of getting the job done must be the support offered by the
development environment, which is I suspect the point of the FAQ
quote.

* you would need to be pretty careful in the Ada you wrote to be sure
of exactly what bits of the Ada runtime you were calling in

-- 
Simon Wright                        Work Email: simon.j.wright@gecm.com
GEC-Marconi Radar & Defence Systems            Voice: +44(0)1705-701778
Command & Information Systems Divsion            FAX: +44(0)1705-701800




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

* Re: NT kernel-mode device drivers in Ada?
  1997-06-01  0:00 NT kernel-mode device drivers in Ada? Mike D Bates
                   ` (2 preceding siblings ...)
  1997-06-02  0:00 ` Simon Wright
@ 1997-06-02  0:00 ` Steve O'Neill
  1997-06-05  0:00   ` Ed Falis
  1997-06-05  0:00 ` Adam Beneschan
  1997-06-07  0:00 ` Robert Dewar
  5 siblings, 1 reply; 10+ messages in thread
From: Steve O'Neill @ 1997-06-02  0:00 UTC (permalink / raw)



Mike D Bates wrote:
> 
> Could use some help in answering yet another objection to Ada.  Has
> anyone here successfully implemented an NT kernel-mode device driver.
> A FAQ on the subject (http://www.cmkrnl.com/faq.html) says that using
> anything but C for this purpose would be like swimming upstream with a
> brick in each hand.  Can anyone cite experience to the contrary?

Is there some reason why you would not want to use the best (i.e. most
effective) language in its appropriate domain?  If you don't relish
swimming upstream with bricks then don't.  Use C (or the advisable
portions of C++) for the device driver development where it appears to
have advantages in terms of productivity.  Use Ada for the majority of
the simulator where, IMHO, it definitely has productivity advantages. 
Provide and Ada interface to the driver.

Just because it's what NT was written in and is the best supported
language to write drivers in doesn't mean that C should be the only
language used to develop the entire application.

I doubt that the cost of the two compilers combined could even come
close to the cost incurred by using Ada for driver development or C for
simulation development and support.

Steve O'Neill




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

* Re: NT kernel-mode device drivers in Ada?
  1997-06-05  0:00   ` Ed Falis
@ 1997-06-05  0:00     ` Matthew S. Whiting
  0 siblings, 0 replies; 10+ messages in thread
From: Matthew S. Whiting @ 1997-06-05  0:00 UTC (permalink / raw)



Ed Falis wrote:
> 
> We haven't yet had a chance to try it, but we believe it to be feasible to
> write device drivers in Ada with our product (ObjectAda).  It's on my "to
> do" list.

Would you drop a note here if/when you succeed with this?

Matt

-- 
Remove question marks (spam repellent) from address to reply.




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

* Re: NT kernel-mode device drivers in Ada?
  1997-06-01  0:00 NT kernel-mode device drivers in Ada? Mike D Bates
                   ` (3 preceding siblings ...)
  1997-06-02  0:00 ` Steve O'Neill
@ 1997-06-05  0:00 ` Adam Beneschan
  1997-06-07  0:00 ` Robert Dewar
  5 siblings, 0 replies; 10+ messages in thread
From: Adam Beneschan @ 1997-06-05  0:00 UTC (permalink / raw)



In article <5mr324$8im@ion1.ionet.net> mbates@ionet.net (Mike D Bates) writes:
 
 >Could use some help in answering yet another objection to Ada.  Has
 >anyone here successfully implemented an NT kernel-mode device driver.
 >A FAQ on the subject (http://www.cmkrnl.com/faq.html) says that using
 >anything but C for this purpose would be like swimming upstream with a
 >brick in each hand.  Can anyone cite experience to the contrary?

Although it would be helpful to hear of others' experiences, it should
be noted that the comment about swimming upstream refers to using a
C/C++ compiler other than the one he recommends, and not to using
another language.  (His main objection to using another language is
that you have to translate a whole bunch of .h files.)

                                -- Adam




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

* Re: NT kernel-mode device drivers in Ada?
  1997-06-02  0:00 ` Steve O'Neill
@ 1997-06-05  0:00   ` Ed Falis
  1997-06-05  0:00     ` Matthew S. Whiting
  0 siblings, 1 reply; 10+ messages in thread
From: Ed Falis @ 1997-06-05  0:00 UTC (permalink / raw)



We haven't yet had a chance to try it, but we believe it to be feasible to
write device drivers in Ada with our product (ObjectAda).  It's on my "to
do" list.

The main issue is that for now you would have to provide import pragmas for
the DDK routines you use, as well as selecting the appropriate types from
interfaces.c or the win32api binding.  You will probably also need to
exercise some care about what features you use.

- Ed
 Steve O'Neill wrote in article <339336BB.602D@top.monad.net>...
>Mike D Bates wrote:
>>
>> Could use some help in answering yet another objection to Ada.  Has
>> anyone here successfully implemented an NT kernel-mode device driver.
>> A FAQ on the subject (http://www.cmkrnl.com/faq.html) says that using
>> anything but C for this purpose would be like swimming upstream with a
>> brick in each hand.  Can anyone cite experience to the contrary?
>
>Is there some reason why you would not want to use the best (i.e. most
>effective) language in its appropriate domain?  If you don't relish
>swimming upstream with bricks then don't.  Use C (or the advisable
>portions of C++) for the device driver development where it appears to
>have advantages in terms of productivity.  Use Ada for the majority of
>the simulator where, IMHO, it definitely has productivity advantages.
>Provide and Ada interface to the driver.
>
>Just because it's what NT was written in and is the best supported
>language to write drivers in doesn't mean that C should be the only
>language used to develop the entire application.
>
>I doubt that the cost of the two compilers combined could even come
>close to the cost incurred by using Ada for driver development or C for
>simulation development and support.
>
>Steve O'Neill
> 






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

* Re: NT kernel-mode device drivers in Ada?
  1997-06-01  0:00 NT kernel-mode device drivers in Ada? Mike D Bates
                   ` (4 preceding siblings ...)
  1997-06-05  0:00 ` Adam Beneschan
@ 1997-06-07  0:00 ` Robert Dewar
  5 siblings, 0 replies; 10+ messages in thread
From: Robert Dewar @ 1997-06-07  0:00 UTC (permalink / raw)



Mike says

<<Could use some help in answering yet another objection to Ada.  Has
anyone here successfully implemented an NT kernel-mode device driver.
A FAQ on the subject (http://www.cmkrnl.com/faq.html) says that using
anything but C for this purpose would be like swimming upstream with a
brick in each hand.  Can anyone cite experience to the contrary?
>>

I don't see this as an objection to Ada. No one in their right minds says
Ada is the right tool for every task (No one in their right minds says
C is the right tool for every task either!)





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

end of thread, other threads:[~1997-06-07  0:00 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1997-06-01  0:00 NT kernel-mode device drivers in Ada? Mike D Bates
1997-06-01  0:00 ` Larry Kilgallen
1997-06-01  0:00   ` Mike D Bates
1997-06-01  0:00 ` Dale Stanbrough
1997-06-02  0:00 ` Simon Wright
1997-06-02  0:00 ` Steve O'Neill
1997-06-05  0:00   ` Ed Falis
1997-06-05  0:00     ` Matthew S. Whiting
1997-06-05  0:00 ` Adam Beneschan
1997-06-07  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