Hardware Interrupts
From: Carroll-Tech (andrew_at_carroll-tech.net)
Date: 02/21/04
- Next message: tmoran_at_acm.org: "system calls, was Re: Hardware Interrupts"
- Previous message: Michael Erdmann: "Q: GPS and Preprocessor"
- Next in thread: tmoran_at_acm.org: "system calls, was Re: Hardware Interrupts"
- Reply: tmoran_at_acm.org: "system calls, was Re: Hardware Interrupts"
- Maybe reply: sk: "Re: Hardware Interrupts"
- Maybe reply: Carroll-Tech: "Re: Hardware Interrupts"
- Maybe reply: sk: "Re: Hardware Interrupts"
- Maybe reply: Carroll-Tech: "Re: Hardware Interrupts"
- Maybe reply: sk: "Re: Hardware Interrupts"
- Maybe reply: Carroll-Tech: "Re: Hardware Interrupts"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Sat, 21 Feb 2004 13:39:40 -0700 To: <comp.lang.ada@ada-france.org>
Has anyone here read "Ada Concurrent Programming" by Narain Gehani?
In the book, Narain talks about address clauses. For example:
task Interrupt_handler is
entry DONE;
for DONE use at 16#40#;
end Interrupt_handler;
Can an address clause be done with a procedure or function instead of a
task entry?
What about arguments?
How can I capture a return value, if there is one?
I want to call the BIOS interrupt (INT11h) to get the equipment list
word. In my Assembly book it says that INT11h "returns" a word
containing the equipment list. I'm assuming that a '1' at a given bit
within the word means the equipment is in the computer and '0' is not.
Here is my code so far
-------------------------------------------------------
with ada.text_io; use ada.text_io;
with system.interrupts; use system.interrupts;
procedure getequipment is
type equiplist is array(0..15) of boolean;
package boolean_io is new enumeration_io(boolean);
procedure getlist(list: out equiplist);
for getlist use at reference(16#11#);
mylist: equiplist;
begin
getlist(mylist);
-- for I in 0..15 loop
-- boolean_io.put(mylist(i));
-- end loop;
end getequipment;
------------------------------------------------------
When I compile this code the compiler says several things
that I do not know how to fix.
getequipment.adb:2:12: warning: "system.interrupts" is an internal GNAT unit
getequipment.adb:2:12: warning: use of this unit is non-portable and
version-dependent
getequipment.adb:7:09: missing body for "getlist"
getequipment.adb:8:13: address clause can only be given for imported
subprogram
Any ideas?
Maybe there is an easier way to call INT11h from Ada?
I looked into System.Machine_Code and the ASM procedure but that seems
pretty
complex (per GNAT reference manual explanation).
- Next message: tmoran_at_acm.org: "system calls, was Re: Hardware Interrupts"
- Previous message: Michael Erdmann: "Q: GPS and Preprocessor"
- Next in thread: tmoran_at_acm.org: "system calls, was Re: Hardware Interrupts"
- Reply: tmoran_at_acm.org: "system calls, was Re: Hardware Interrupts"
- Maybe reply: sk: "Re: Hardware Interrupts"
- Maybe reply: Carroll-Tech: "Re: Hardware Interrupts"
- Maybe reply: sk: "Re: Hardware Interrupts"
- Maybe reply: Carroll-Tech: "Re: Hardware Interrupts"
- Maybe reply: sk: "Re: Hardware Interrupts"
- Maybe reply: Carroll-Tech: "Re: Hardware Interrupts"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|