* Re: Hardware Interrupts
[not found] <20040224021013.DE8C84C40D0@lovelace.ada-france.org>
@ 2004-02-24 11:04 ` Carroll-Tech
2004-02-24 12:58 ` Preben Randhol
0 siblings, 1 reply; 4+ messages in thread
From: Carroll-Tech @ 2004-02-24 11:04 UTC (permalink / raw)
To: comp.lang.ada
> ----------------------------------------------------------------------
> 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!!
^ permalink raw reply [flat|nested] 4+ messages in thread