HP 3000 Manuals

What Is an Intrinsic Mechanism? [ MPE/iX Intrinsics Reference Manual ] MPE/iX 5.0 Documentation


MPE/iX Intrinsics Reference Manual

What Is an Intrinsic Mechanism? 

The MPE/iX intrinsics mechanism provides flexible and convenient access
to intrinsic routines from various languages.  When an external routine
is designated as an intrinsic, the compiler uses the intrinsics mechanism
to determine how to invoke the routine correctly.  For example, a
compiler receives information about the number of parameters, the type of
each parameter, and the functional return type (if applicable) and does
the following:

   *   Provides a consistent intrinsic interface

   *   Reduces the burden and error potential of coding multiple external
       procedure declarations with all the parameters and type
       declarations required in some languages

   *   Ensures proper data type conversion

   *   Verifies proper data alignment

   *   Provides proper indirect address references to data

   *   Generates proper reference parameter addresses

   *   Assigns values to default parameters and correctly resolves
       optional parameters omitted at the end of an intrinsic call

   *   Provides parameter checking for languages that have no mechanism
       for detailed external declarations

   *   Permits inter-language calls that may not be possible within a
       particular programming language

   *   Provides name translation for case-insensitive languages

   *   Allows future extension without requiring source code changes

For example, Pascal/XL requires a detailed routine header for all
external routines, and all calls to a routine must adhere to strict
typing constraints.  However, by designating a routine as an intrinsic,
the compiler uses the intrinsics mechanism to determine how to call the
routine which permits removal of the detailed routine header and relaxes
the strict typing constraints.

Since the type information, stored in the intrinsic mechanism, is in
language-independent form, you can pass parameters of any type that
conform functionally to the types expected by the intrinsic.  This allows
convenient and flexible access to system intrinsics through the
intrinsics mechanism.


NOTE You can define routines for access as if they were intrinsics and place them in new or existing intrinsic files and libraries.


MPE/iX 5.0 Documentation