comp.lang.ada
 help / color / mirror / Atom feed
From: "Carroll-Tech" <andrew@carroll-tech.net>
To: <comp.lang.ada@ada-france.org>
Subject: Re: Hardware Interrupts
Date: Tue, 24 Feb 2004 04:04:32 -0700
Date: 2004-02-24T04:04:32-07:00	[thread overview]
Message-ID: <mailman.18.1077619550.327.comp.lang.ada@ada-france.org> (raw)
In-Reply-To: 20040224021013.DE8C84C40D0@lovelace.ada-france.org

> ----------------------------------------------------------------------
> From: Jerry van Dijk <somename@nospam.demon.nl>
> Subject: Re: Hardware Interrupts
>
> Note this thread escaped me so I might be wrong, but I am guessing you
want
> bootcode for a PC ?

I appologize, I haven't been to clear on what I'm trying to accomplish.  I
am
building my own "super computer".  Ok, well, it's really an experiment to
satisfy my own interests.  Super computer might be a large leap!
However realistic it is I don't really care.  I'm learning things and at
this time
I feel I'm enjoying what I'm doing.  I'm going bankrupt anyway so I might
as well go bankrupt doing something I feel satisfied with.

I've connected two computers together via the IDE ports (altered the ribbon
cable for such purposes).  Now I know that Windows, nor *nix will provide
me with "drivers" for how I connected them nor a kernel to do what I want to
do with the connection.  I don't want to sort through "public" code, like
FreeBSD
C code,  just to print "hello world" or something.

Initially my goal is simple.  Execute code on computer A that displays on
computer B's monitor through the IDE connection.  Let's say "hello world".
That's where hardware interrupts and "chaining" my own interrupt routines
comes into play.  I think, to start, I just want to know what hardware
interrupts are showing up and then I can "chain" my own routines on them
(through the Interrupt vector table) and can eventually achive some kind
of communication between the two computers via the IDE connection.

Call it a driver, call it a kernel, call it balogne, whatever...I just know
that
I've seen examples of using Ada for "chaining" interrupts and I know I
can get the interrupts from the vector table   So to get a feel for what I
am doing I wanted to "practice" working with interrupts from the interrupt
vector table by getting a list of attached hardware from the BIOS.  That was
the arbitrary INT call that I picked out from the references I have.  I know
it has a list because it prints it out when it boots up and several authors
have placed information in their written work describing an INT instruction
that yields that information.

I don't "have" to get the hardware list.  I could go with something else
like
detecting if their is a printer installed or something.  I just want to get
familiar
with the interrupt "stuff" and the hardware list was my initial choice.


>------------------------------
> From: tmoran@acm.org
> Subject: Re: Hardware Interrupts
>
>   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.

Ahhhhhh, GREAT information!!!



> ------------------------------
> From: sk <noname@myob.com>
> Subject: Re: Hardware Interrupts
>
> it (by the way "Jerry van Dijk" authored an inline
> assembler tutorial for GNAT which is now part of
> the manual.

Is it in the gnat_ug.html?  Where?

> Some thoughts for you:
[snip]
> parameters to procedures etc at the assembly level.
> The study should give you some ideas on how to create
> assembly routines which you can "pragma Import (ASM, ...)"

I'll have to play around with that.  Thank you!



> ------------------------------
> From: "Brian Catlin" <BrianC@sannas.org.bad>
> Subject: Re: Hardware Interrupts
>
> 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),
[snip]
> Get the ACPI specs
> (www.acpi.info) 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.).

Cool!!  I'm going to look into this also.  Thank you!!

Thanks for the help all!!






       reply	other threads:[~2004-02-24 11:04 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20040224021013.DE8C84C40D0@lovelace.ada-france.org>
2004-02-24 11:04 ` Carroll-Tech [this message]
2004-02-24 12:58   ` Hardware Interrupts Preben Randhol
2004-02-24 13:03     ` GNAT Inline Assembly Tutorial missing ( Re: Hardware Interrupts) Preben Randhol
     [not found]       ` <m28yisxibp.fsf@jvdsys.demon.nl>
2004-02-25  7:57         ` Preben Randhol
     [not found] <m24qtgxgpg.fsf@jvdsys.demon.nl>
2004-02-24 23:05 ` Hardware Interrupts tmoran
2004-02-25  1:43   ` Chad R. Meiners
     [not found] <20040222110018.15E3A4C40CF@lovelace.ada-france.org>
2004-02-23  9:56 ` Carroll-Tech
2004-02-23 19:00   ` tmoran
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] <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