[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[no subject]
ORCA/Pascal can only call external code that uses ORCA/Pascal's calling
conventions. The main requirements are how parameters are passed and
values are returned. The other requirement is that the function or
procedure name must be upper case (Pascal is not case sensitive, so
ORCA/Pascal converts all identifiers to upper case internally).
If you declare C functions using the 'pascal' directive, ORCA/C will
make the function obey the Pascal calling conventions, including
capitalising the function name in the object file.
ORCA/Modula-2 has similar restrictions: it can only call functions
that obey ORCA/Modula-2 or ORCA/Pascal calling conventions (which are
quite different). It cannot call ORCA/C functions directly.
In its present form, MTLib can only be called directly from ORCA/C, or
from assembly language. For other languages, assembly language or
ORCA/C "glue" code would be required.
The easiest way to make the library more usable would be for its
author to recompile it so that all of the functions are declared with
the 'pascal' directive. Ian?
This would allow it to be called directly from ORCA/Pascal and
ORCA/Modula-2, provided someone writes appropriate interface files (a
unit for ORCA/Pascal, a definition module for ORCA/Modula-2).
--
David Empson
dempson@actrix.gen.nz
Snail mail: P.O. Box 27-103, Wellington, New Zealand