comp.lang.ada
 help / color / mirror / Atom feed
From: "Brian Catlin" <BrianC@sannas.org.bad>
Subject: Re: Hardware Interrupts
Date: Mon, 23 Feb 2004 20:39:00 GMT
Date: 2004-02-23T20:39:00+00:00	[thread overview]
Message-ID: <Ext_b.5423$yZ1.4335@newsread2.news.pas.earthlink.net> (raw)
In-Reply-To: X4s_b.108457$jk2.483600@attbi_s53

<tmoran@acm.org> 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





  reply	other threads:[~2004-02-23 20:39 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20040222110018.15E3A4C40CF@lovelace.ada-france.org>
2004-02-23  9:56 ` Hardware Interrupts Carroll-Tech
2004-02-23 19:00   ` tmoran
2004-02-23 20:39     ` Brian Catlin [this message]
2004-02-23 21:06       ` David C. Hoos
2004-02-23 21:56         ` Brian Catlin
     [not found] ` <001501c3f9f3$533ece60$0201a8c0@win>
2004-02-23 19:49   ` sk
     [not found] <m24qtgxgpg.fsf@jvdsys.demon.nl>
2004-02-24 23:05 ` tmoran
2004-02-25  1:43   ` Chad R. Meiners
     [not found] <20040224021013.DE8C84C40D0@lovelace.ada-france.org>
2004-02-24 11:04 ` Carroll-Tech
2004-02-24 12:58   ` Preben Randhol
     [not found] <20040222005514.BF2284C40CF@lovelace.ada-france.org>
2004-02-22  3:01 ` Carroll-Tech
2004-02-22  6:39   ` tmoran
     [not found] ` <003901c3f8f0$1cfd2ee0$0201a8c0@win>
2004-02-22 21:20   ` sk
     [not found] <20040221110026.E93C54C40C5@lovelace.ada-france.org>
2004-02-21 20:39 ` Carroll-Tech
     [not found] ` <000501c3f8bb$189b2760$0201a8c0@win>
2004-02-21 22:32   ` sk
replies disabled

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