comp.lang.ada
 help / color / mirror / Atom feed
* NASM and the Art of Ada.
@ 2003-08-08 19:33 Freejack
  2003-08-08 21:52 ` Ludovic Brenta
  0 siblings, 1 reply; 2+ messages in thread
From: Freejack @ 2003-08-08 19:33 UTC (permalink / raw)


I've been looking around AdaPower and other places for information on
embedding Assembler code into Ada sources in general.

I realize that Ada has it's own inline Assembler syntax, which is fine
for tiny optimizations. However, I have libs written in assembler which I
tweaked to make the most of my current hardware. I'd like to use those.
I.e. I usually write a portable lib in a HLL and then use Assembler for a
drop in, highly optimized replacement at link time if one is available,
or I've written my own.

I'm using both Linux and FreeBSD boxes for my work.

I've seen the Gas instructions in the Big Online Book of Linux Ada
programming. I fucking hate Gas. NASM is my cup of tea. I can work with
Gas if I have too, but I really dont want too.

Enough rambling. Any pointers on the "best" way to create an object file
for linking with Ada generated Object files?
Is it possible to tweak the linker script (ld.so) to enhance the safety
/speed of the resulting executable? Or is is this better left to GNAT?

Can I create hooks for some of the Debug pools features of an Ada
compilation system?

I've been toying with the idea of creating some Ada plugs for Randall
Hyde's High Level Assembly(HLA) programming package. Would anyone be
interested in such a beast?

Any pointers would be greatly appreciated. Thanks.

Freejack

p.s. I always try to ask interesting questions, rather than clutter the
newsgroup with banality. If this post was too banal, let me know. Heh.



^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: NASM and the Art of Ada.
  2003-08-08 19:33 NASM and the Art of Ada Freejack
@ 2003-08-08 21:52 ` Ludovic Brenta
  0 siblings, 0 replies; 2+ messages in thread
From: Ludovic Brenta @ 2003-08-08 21:52 UTC (permalink / raw)


Freejack <freejack@nospam.net> writes:
[...]
> Any pointers on the "best" way to create an object file for linking
> with Ada generated Object files?
[...]

Perhaps make your assembler object files conform to the C calling
convention, then import the routines into your code Ada using pragma
Interface (C, ...)?  I think you can do this with any assembler, NASM
included.

-- 
Ludovic Brenta.



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2003-08-08 21:52 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-08-08 19:33 NASM and the Art of Ada Freejack
2003-08-08 21:52 ` Ludovic Brenta

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