comp.lang.ada
 help / color / mirror / Atom feed
From: "John Merryweather Cooper" <jmcoopr@webmail.bmi.net>
Subject: Calling a GNAT (or other Ada 95) Procedure from x86 Assembly
Date: 2000/03/08
Date: 2000-03-08T00:00:00+00:00	[thread overview]
Message-ID: <sccv1i7ibi7118@corp.supernews.com> (raw)

Call me diseased, but I've had an itch lately to write an OS/2 PDD device
driver mostly in Ada 95.  The crux though is how to interface Ada95
strategy, interrupt, and timer routines with an x86 stub so that the
resulting driver has the correct ordering of its components:  Device Header,
Data, Code, etc.

For reference, the Strategy routine would be called:  TulipNICStrategy--is
passed one unsigned integer on the stack; the interrupt routine would be
called TulipNIC_ISR--is passed no arguments; and the timer routine would be
called TulipNIC_TSR--and is also passed no arguments.

Of course the ultimate would be to replace the x86 stub with Ada 95 too, but
I have no idea how I'd do that and enforce the necessary ordering in the
resulting driver file.

All of this can be done in a fairly straight-forward manner in C, but this
driver is fairly complicated and I'd prefer to avoid the bugs that a C
implementation is inevitably going to enforce on me.  Any ideas?

jmc







                 reply	other threads:[~2000-03-08  0:00 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed
replies disabled

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