comp.lang.ada
 help / color / mirror / Atom feed
* Ada calling Fortran or Assembly
@ 1999-06-04  0:00 pit_viper_2000
  1999-06-04  0:00 ` dennison
  0 siblings, 1 reply; 5+ messages in thread
From: pit_viper_2000 @ 1999-06-04  0:00 UTC (permalink / raw)


Anyone know how to link in Fortran from Ada?  I have about 3,000 lines
of Fortran code that does lots of stuff with some numbers I read in
from a serial port...I don't want to have to rewrite the whole thing in
Ada...I'd rather just make calls to the Fortran subroutines.  I know to
do some pragma Imports and pragma Linker_Options, but I don't know what
exact files to link in with the Linker_Options...nor do I know the
order to link them in.  I was told the order matters.  

Any help would be greatly appreciated.  

NEXT:

If I can't get the Fortran to work, then I'll rewrite that code, but I
still need to get access to some assembly language procedures that the
Fortran was linking to.  But I can't get Ada to link to Assembly
language procedures.  I have MASM 6.11 and the .obj files from that
aren't recognized by the GNAT 3.11 (windows95 version) compiler.  If
someone knows how to write in-line assmebly in Ada, let me know. 
Otherwise, does anyone know how to call the assembly procs from Ada. 
All of the procs are labeled as "far" procs.  As far as I know, the
assembly is set up to be referenced from higher level languages.  Like
I said, it linked to the fortran.  

Again, any help would be greatly appreciated.
--
Posted via Talkway - http://www.talkway.com
Exchange ideas on practically anything (tm).





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

* Re: Ada calling Fortran or Assembly
  1999-06-04  0:00 Ada calling Fortran or Assembly pit_viper_2000
@ 1999-06-04  0:00 ` dennison
  1999-06-04  0:00   ` pit_viper_2000
  0 siblings, 1 reply; 5+ messages in thread
From: dennison @ 1999-06-04  0:00 UTC (permalink / raw)


In article <ZER53.2383$Xr4.20175@c01read02-admin.service.talkway.com>,
  "pit_viper_2000" <pit_viper_2000@hotmail.com> wrote:
> Anyone know how to link in Fortran from Ada?  I have about 3,000 lines
> of Fortran code that does lots of stuff with some numbers I read in
> from a serial port...I don't want to have to rewrite the whole thing
in
> Ada...I'd rather just make calls to the Fortran subroutines.  I know
to
> do some pragma Imports and pragma Linker_Options, but I don't know
what
> exact files to link in with the Linker_Options...nor do I know the
> order to link them in.  I was told the order matters.

This is probably quite doable, but it is a highly system dependent
thing. There's no way anyone can give you an answer unless you specify
what platform/OS you are using, and what Ada and C compilers you are
using.

--
T.E.D.


Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't.




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

* Re: Ada calling Fortran or Assembly
  1999-06-04  0:00 ` dennison
@ 1999-06-04  0:00   ` pit_viper_2000
  1999-06-04  0:00     ` David C. Hoos, Sr.
  1999-06-04  0:00     ` dennison
  0 siblings, 2 replies; 5+ messages in thread
From: pit_viper_2000 @ 1999-06-04  0:00 UTC (permalink / raw)


> This is probably quite doable, but it is a highly system dependent
> thing. There's no way anyone can give you an answer unless you specify
> what platform/OS you are using, and what Ada and C compilers you are
> using.
> 
> --
> T.E.D.

I'm using a Windows95 machine; GNAT 3.11 for Ada and Microsoft Fortran
Powerstation 4.0 for the Fortran Code.  MASM 6.11 for the Assembly
code, and I don't have a C compiler on my system.  

I hope that helps.  

Chris
--
Posted via Talkway - http://www.talkway.com
Exchange ideas on practically anything (tm).





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

* Re: Ada calling Fortran or Assembly
  1999-06-04  0:00   ` pit_viper_2000
  1999-06-04  0:00     ` David C. Hoos, Sr.
@ 1999-06-04  0:00     ` dennison
  1 sibling, 0 replies; 5+ messages in thread
From: dennison @ 1999-06-04  0:00 UTC (permalink / raw)


In article <QXT53.2432$Xr4.20927@c01read02-admin.service.talkway.com>,
  "pit_viper_2000" <pit_viper_2000@hotmail.com> wrote:
> > This is probably quite doable, but it is a highly system dependent
> > thing. There's no way anyone can give you an answer unless you
specify
> > what platform/OS you are using, and what Ada and C compilers you are
> > using.

> I'm using a Windows95 machine; GNAT 3.11 for Ada and Microsoft Fortran
> Powerstation 4.0 for the Fortran Code.  MASM 6.11 for the Assembly
> code, and I don't have a C compiler on my system.

Whoops. We get the same question so much from C folks, that I made a
mental cut-and-paste error. I meant your Fortran compiler, of course.
:-)

--
T.E.D.


Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't.




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

* Re: Ada calling Fortran or Assembly
  1999-06-04  0:00   ` pit_viper_2000
@ 1999-06-04  0:00     ` David C. Hoos, Sr.
  1999-06-04  0:00     ` dennison
  1 sibling, 0 replies; 5+ messages in thread
From: David C. Hoos, Sr. @ 1999-06-04  0:00 UTC (permalink / raw)



pit_viper_2000 wrote in message ...
>> This is probably quite doable, but it is a highly system dependent
>> thing. There's no way anyone can give you an answer unless you specify
>> what platform/OS you are using, and what Ada and C compilers you are
>> using.
>>
>> --
>> T.E.D.
>
>I'm using a Windows95 machine; GNAT 3.11 for Ada and Microsoft Fortran
>Powerstation 4.0 for the Fortran Code.  MASM 6.11 for the Assembly
>code, and I don't have a C compiler on my system.
>
If you have the public release of gnat-3.11, then you have a C compiler --
gcc 2.8.1







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

end of thread, other threads:[~1999-06-04  0:00 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1999-06-04  0:00 Ada calling Fortran or Assembly pit_viper_2000
1999-06-04  0:00 ` dennison
1999-06-04  0:00   ` pit_viper_2000
1999-06-04  0:00     ` David C. Hoos, Sr.
1999-06-04  0:00     ` dennison

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