comp.lang.ada
 help / color / mirror / Atom feed
From: kilgallen@eisner.decus.org (Larry Kilgallen)
Subject: Re: Addresses of Subprograms (was: New GNAT ports)
Date: 1997/01/13
Date: 1997-01-13T00:00:00+00:00	[thread overview]
Message-ID: <1997Jan13.102240.1@eisner> (raw)
In-Reply-To: 1997Jan11.152602.1@eisner


 In article <dewar.852774527@merv>, dewar@merv.cs.nyu.edu (Robert Dewar) writes:
> Richard said
> 
> "The only reason that I bothered about the placement of code at all
> was that the 8051 book I was studying included a memory test program
> that did this.  According to the Ada 83 LRM I had handy, you _couldn't_
> supply address clauses for code."
> 
> That is wrong, Ada 83 did allow you to specify the address of a subprogram,
> and in fact using this in conjunction with pragma Interface was a well
> known way of fooling a compiler into providing a mechanism equiavlent to
> an indirect call:

These two uses for specifying the address of code (memory test vs.
indirect call) would seem to conflict in the case of Alpha VMS
where the "procedure value" commonly passed as the "address"
of a subprogram is quite different from the address of the first
instruction of the subprogram executable code.

I am curious regarding the approach ACT is taking in this regard.

The need for fooling the compiler goes away in Ada95, and the use
of a different mechanism in DEC Ada means code migrating from there
would not depend on that trick for indirect calls.

Macintosh 68K images depend heavily on a "jump table" where once
again the "address" of a routine is quite a different thing from
the location of its code (and, in fact, the location of the code
might not be resolved until call time).

Do other operating systems have this separation, and which is the
"true" meaning for specifying the address of a subprogram from an
Ada perspective ?

Larry Kilgallen




  reply	other threads:[~1997-01-13  0:00 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1996-12-24  0:00 New GNAT ports (was Re: Ada and Automotive Industry) Robert Dewar
1996-12-27  0:00 ` New GNAT ports John Howard
1997-01-07  0:00 ` New GNAT ports (was Re: Ada and Automotive Industry) Richard A. O'Keefe
1997-01-07  0:00   ` Robert Dewar
1997-01-08  0:00     ` Ken Garlington
1997-01-08  0:00     ` Richard A. O'Keefe
1997-01-08  0:00       ` Robert Dewar
1997-01-07  0:00   ` Robert A Duff
1997-01-07  0:00     ` Robert Dewar
1997-01-08  0:00     ` Richard A. O'Keefe
1997-01-09  0:00       ` Dr. Peter E. Obermayer
1997-01-07  0:00   ` Ken Garlington
1997-01-08  0:00     ` Richard A. O'Keefe
1997-01-08  0:00       ` Robert Dewar
1997-01-09  0:00         ` Richard A. O'Keefe
1997-01-11  0:00           ` Robert Dewar
1997-01-11  0:00         ` Addresses of Subprograms (was: New GNAT ports) Larry Kilgallen
1997-01-13  0:00           ` Larry Kilgallen [this message]
1997-01-14  0:00             ` Richard A. O'Keefe
1997-01-14  0:00               ` Fergus Henderson
1997-01-15  0:00             ` Richard Kenner
1997-01-09  0:00       ` New GNAT ports (was Re: Ada and Automotive Industry) Ken Garlington
1997-01-08  0:00   ` Karl Cooper
1997-01-08  0:00     ` Robert Dewar
1997-01-09  0:00     ` Richard A. O'Keefe
1997-01-09  0:00       ` Robert Dewar
1997-01-09  0:00   ` Robert I. Eachus
1997-01-10  0:00   ` Robert I. Eachus
1997-01-11  0:00     ` Robert Dewar
1997-01-13  0:00       ` Richard A. O'Keefe
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox