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.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,7c65ca5609a07b8c X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2004-02-23 11:00:08 PST Path: archiver1.google.com!news2.google.com!newsfeed2.dallas1.level3.net!news.level3.com!crtntx1-snh1.gtei.net!news.gtei.net!newsfeed1.easynews.com!easynews.com!easynews!elnk-pas-nf1!elnk-nf2-pas!newsfeed.earthlink.net!wn51feed!worldnet.att.net!attbi_s53.POSTED!not-for-mail From: tmoran@acm.org Newsgroups: comp.lang.ada Subject: Re: Hardware Interrupts References: X-Newsreader: Tom's custom newsreader Message-ID: NNTP-Posting-Host: 67.161.24.134 X-Complaints-To: abuse@comcast.net X-Trace: attbi_s53 1077562807 67.161.24.134 (Mon, 23 Feb 2004 19:00:07 GMT) NNTP-Posting-Date: Mon, 23 Feb 2004 19:00:07 GMT Organization: Comcast Online Date: Mon, 23 Feb 2004 19:00:07 GMT Xref: archiver1.google.com comp.lang.ada:5749 Date: 2004-02-23T19:00:07+00:00 List-Id: >It seems like what I need is to define a procedure, say >"getequiplist" and then define what machine code is >supposed to be generated by the compiler for "getequiplist". And the way you "define what machine code is supposed to be generated" is by describing it using Machine-Code Insertions. A generally better way is to define a general BIOS call procedure, eg Procedure Int_Call(Int_Num : Integer; Regs : In Out Most_Regs); -- Call the interrupt (for BIOS use, others?) with the registers set -- from Regs. The result registers and flags are placed back into Regs. (Taken from Janus Ada 83 "package DosCall") and then define function Get_BIOS_Equipment_List return ... is Regs : Most_Regs := (AX=>..., BX=>..., ... begin Int_Call(16#11#, Regs); return ... end Get_BIOS_Equipment_List; But note that you need an Ada compiler that generates code for your machine/OS combination - in this case 16 bit "real mode" x86 with your boot loader (no DOS) as the OS. If you don't mind a little dust on the antique manuals ;), I'm sure you could purchase such a thing. I don't know if, say, MaRTE OS, supports 16 bit BIOS calls.