comp.lang.ada
 help / color / mirror / Atom feed
From: sk <noname@myob.com>
Cc: comp.lang.ada@ada-france.org
Subject: Re: Hardware Interrupts
Date: Mon, 23 Feb 2004 13:49:02 -0600
Date: 2004-02-23T13:49:02-06:00	[thread overview]
Message-ID: <mailman.15.1077565401.327.comp.lang.ada@ada-france.org> (raw)
In-Reply-To: 001501c3f9f3$533ece60$0201a8c0@win

andrew@carroll-tech.net :
 > Are the things I am asking about the same things that motivate
 > AdaOS to build a compiler?

I do not know about the AdaOS group, but you can get quite
far without having to hack the GNAT run-time or the compiler.

The area where GNAT (on Linux or Windows, I do not know
about *BSD's) will be unreliable, as "Jerry van Dijk"
points out, is in 16-bit mode. GCC does document a switch
that causes it to produce 16-bit code, but it also
documents that they, the gcc people, would not rely on
it (by the way "Jerry van Dijk" authored an inline
assembler tutorial for GNAT which is now part of
the manual. I found the turorial to be one of the
most useful practical discussions of "gas" assembly
even though it is limited to an Ada inline scope).

Some thoughts for you:

procedure X is

     procedure A is
     begin
         null;
     end A;

     procedure B (N : natural) is
     begin
         null;
     end B;

     procedure C (N : in out natural) is
     begin
         null;
     end C;

     Num : Natural;

begin
     A;
     B (Num);
     C (Num);
end X;

Use the "-s" gnatmake switch to compile and peruse the
produced assembly code and notice the pushes and pops
prior to and after the calls to the procedures. This
would give you a good idea of how gcc/GNAT passes
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, ...)"

(PS Still hoping someone has a EduOs-Ada-CINA that
they can get back to me, thanks :-).

-- 
-------------------------------------------------
-- Merge vertically for real address
--
--     s n p @ t . o
--      k i e k c c m
-------------------------------------------------




  parent reply	other threads:[~2004-02-23 19:49 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
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 [this message]
     [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