comp.lang.ada
 help / color / mirror / Atom feed
From: tmoran@acm.org
Subject: Re: Hardware Interrupts
Date: Mon, 23 Feb 2004 19:00:07 GMT
Date: 2004-02-23T19:00:07+00:00	[thread overview]
Message-ID: <X4s_b.108457$jk2.483600@attbi_s53> (raw)
In-Reply-To: mailman.14.1077529068.327.comp.lang.ada@ada-france.org

>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.



  reply	other threads:[~2004-02-23 19:00 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 [this message]
2004-02-23 20:39     ` Brian Catlin
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