comp.lang.ada
 help / color / mirror / Atom feed
From: Samuel Mize <smize@imagin.net>
Subject: Re: What's wrong with this simple Ada w/ assembly code?
Date: 1999/03/04
Date: 1999-03-04T00:00:00+00:00	[thread overview]
Message-ID: <7bmjrm$kjt@news1.newsguy.com> (raw)
In-Reply-To: 7bmb69$1bh$1@its.hooked.net

Mike Silva <mjsilva@jps.net> wrote:
> 
> robert_dewar@my-dejanews.com wrote in message
> <7bm0kb$8uj$1@nnrp1.dejanews.com>...
>>
>>GNAT simply follows the standard ABI, so if you follow
>>this you should have no trouble. If you don't know the
>>ABI, you are indeed wandering in the dark.
> 
> 
> What exactly is ABI?  I've haven't found the term in the ARM or Rationale or
> any of my books.

Application Binary Interface, if I recall correctly.  It's a standard
that defines how systems utilities are called, at the assembler level.

All the system routines will follow a consistent set of rules about how
they are to be called.  These define, for instance, what order parameters
should be on the stack, whether the caller has shifted the stack pointer
before making the call, and so on.

You *have* to follow these rules to make system calls from assembler (and
your compiler has to follow them to make those system calls for you).

You can make up your own rules for your own assembler subroutines, but
you'd be stupid to do so (in most cases).  The smartest thing is to find
out how your operating system expects subroutine calls to be coded, and
code your assembly that way.

If you do so, you're also coding it the way the compiler expects things
to be done.  So, an assembly routine that's coded in accordance with
the ABI can be called by other assembly routines, or by routines coded
in any language, if you have a half-decent compiler (or better).

Best,
Sam Mize

-- 
Samuel Mize -- smize@imagin.net (home email) -- Team Ada
Fight Spam: see http://www.cauce.org/ \\\ Smert Spamonam




  parent reply	other threads:[~1999-03-04  0:00 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1999-03-03  0:00 What's wrong with this simple Ada w/ assembly code? Josh Highley
1999-03-04  0:00 ` Tom Moran
1999-03-04  0:00   ` robert_dewar
1999-03-04  0:00 ` robert_dewar
1999-03-04  0:00   ` Mike Silva
1999-03-04  0:00     ` Josh Highley
1999-03-04  0:00     ` Samuel Mize [this message]
1999-03-04  0:00       ` Tom Moran
1999-03-05  0:00         ` robert_dewar
1999-03-05  0:00           ` Tom Moran
1999-03-04  0:00     ` robert_dewar
1999-03-05  0:00       ` Mike Silva
1999-03-05  0:00         ` Ed Falis
1999-03-08  0:00     ` Matthew Heaney
1999-03-06  0:00 ` Nick Roberts
1999-03-06  0:00   ` David Botton
1999-03-07  0:00   ` Tom Moran
1999-03-07  0:00 ` Jerry van Dijk
1999-03-07  0:00   ` Tom Moran
1999-03-08  0:00     ` Jerry van Dijk
1999-03-14  0:00   ` Josh Highley
1999-03-14  0:00     ` David C. Hoos, Sr.
1999-03-15  0:00       ` Josh Highley
1999-03-15  0:00     ` Jerry van Dijk
     [not found]       ` <36ef2175.4732984@news.pacbell.net>
1999-03-17  0:00         ` Jerry van Dijk
1999-03-16  0:00     ` Dale Stanbrough
1999-03-16  0:00       ` Jerry van Dijk
replies disabled

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