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 12:39:01 PST Path: archiver1.google.com!news2.google.com!newsfeed2.dallas1.level3.net!news.level3.com!crtntx1-snh1.gtei.net!cambridge1-snf1.gtei.net!news.gtei.net!bos-service1.ext.raytheon.com!cyclone.swbell.net!cyclone-sf.pbi.net!216.196.106.144!border2.nntp.sjc.giganews.com!border1.nntp.sjc.giganews.com!nntp.giganews.com!newsfeed3.easynews.com!newsfeed1.easynews.com!easynews.com!easynews!elnk-pas-nf1!newsfeed.earthlink.net!stamper.news.pas.earthlink.net!newsread2.news.pas.earthlink.net.POSTED!decbec26!not-for-mail From: "Brian Catlin" Newsgroups: comp.lang.ada References: Subject: Re: Hardware Interrupts Organization: Sannas Consulting X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2800.1158 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165 Message-ID: Date: Mon, 23 Feb 2004 20:39:00 GMT NNTP-Posting-Host: 67.101.109.10 X-Complaints-To: abuse@earthlink.net X-Trace: newsread2.news.pas.earthlink.net 1077568740 67.101.109.10 (Mon, 23 Feb 2004 12:39:00 PST) NNTP-Posting-Date: Mon, 23 Feb 2004 12:39:00 PST Xref: archiver1.google.com comp.lang.ada:5751 Date: 2004-02-23T20:39:00+00:00 List-Id: wrote in message news:X4s_b.108457$jk2.483600@attbi_s53... > >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. I really think that you would be better off forgetting the BIOS and do everything yourself. This may sound like a bold statement (and a lot of work), but one of the primary reasons that the Win9x family of operating systems was so unreliable, is that they used the BIOS for I/O. Contrast this with the reliability of NT, 2K, XP, etc., which don't use the BIOS for anything (other than loading their own boot loader from disk). Get the ACPI specs (www.acpi.org) and write your own code to parse the ACPI tables (which contains the hardware configuration of the machine), and write your own "drivers" for the various common PC motherboard hardware (VGA, keyboard, mouse, USB, serial, PCI, etc.). -Brian Brian Catlin, Sannas Consulting 310-944-9492 Windows Network, Video, WDM Device Driver Training & Consulting See WWW.AZIUS.COM.bad for courses and scheduling REMOVE .BAD FROM EMAIL AND WEB ADDRESS