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,XPRIO autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,bcaa209083bfc8fa,start X-Google-Attributes: gid103376,public From: "John Merryweather Cooper" Subject: Calling a GNAT (or other Ada 95) Procedure from x86 Assembly Date: 2000/03/08 Message-ID: #1/1 X-Deja-AN: 594753744 X-Priority: 3 X-MIMEOLE: Produced By Microsoft MimeOLE V5.00.2919.6600 X-Complaints-To: newsabuse@supernews.com Organization: Posted via Supernews, http://www.supernews.com X-MSMail-Priority: Normal Newsgroups: comp.lang.ada Date: 2000-03-08T00:00:00+00:00 List-Id: 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