[comp.sys.transputer] Fortran

abbott@VUSE.VANDERBILT.EDU (Ben Abbott) (05/07/90)

How many Fortran compilers are available for the transputer?
Any experiences ?
What is the best way to integrate Fortran code with LSC ?

Ben Abbott
abbott@vuse.vanderbilt.edu

robertsj@ADMIN.OGI.EDU (John Roberts) (05/08/90)

I'm a software engineer at Cogent Research.  We build a transputer-based
workstation and compute server.  We got our Fortran compiler from
Penguin/Pentasoft/Unidot.  It is now being distributed by Unidot
in Golden, Colorado.

It was a shaky Fortran-77 at best, but with some hacking it passed the
Fortran-77 validation suite.  We totally had to replace the math functions
to pass things like the Elementary Functions test (EleFun).  In general,
though we are able to compile most Fortran codes to run on the transputer.

As far as integrating it with Logical Systems C....  that sounds
rather dubious at best.  I can think of a couple of ways.  First you
would want to use the option in LSC (the latest release) that causes
the code generator to generate relocatable code via passing a static link
(global data pointer) as an argument.  Our Fortran is set up that way
(since we have to have programs load in any arbitrary memory area, they
must be relocatable).  If you have Fortran set up so it isn't producing
relocatable code, then that option should be disabled in LSC.

The traditional way to do it is to have either C call a Fortran library
routine or visa versa.  Fortran always passes an "invisible" pointer as
the first argument that points to where to store the return value from
a function, so beware of calling conventions, but there's nothing
that should prevent you from mixing code.  It has been done where I work.

John Roberts
Cogent Research, Inc.
robertsj@admin.ogi.edu