HP 3000 Manuals

Intrinsic Mechanism (changed) [ Introduction to MPE XL for MPE V Programmers Migration Guide ] MPE/iX 5.0 Documentation


Introduction to MPE XL for MPE V Programmers Migration Guide

Intrinsic Mechanism 
(changed) 

The MPE XL intrinsic mechanism facilitates the declaration of system
intrinsics.  It is the way you gain flexible and convenient access to
intrinsic routines from high-level programming languages.

An intrinsic's callable interface differs from that of other system
library procedures.  MPE V/E makes an intrinsic's procedure declaration
available to other programming languages via its intrinsic file SPLINTR.
MPE XL calls its file SYSINTR.

If you execute in Native Mode (NM), you are strongly encouraged to use
the MPE XL Intrinsic Mechanism when calling system intrinsics.  On MPE
V/E you can also access an intrinsic via an explicit external procedure
declaration, but the MPE XL intrinsic mechanism is designed to handle all
access to intrinsics.

All MPE XL intrinsics are treated as external procedures by user
programs.  In some programming languages, you need not (or cannot) give
descriptions for procedures that are external to your program.  When you
designate that an external routine is an intrinsic, the compiler can use
the intrinsic mechanism to determine how to correctly invoke the routine.
For example, the compiler receives information about the number of
parameters, the type of each parameter, and the functional return type
(if applicable).

Some advantages of using the intrinsic mechanism follow:

 *  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.

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

 *  Permits inter-language calls that might otherwise not be possible
    because compilers can generate the code needed to load parameters
    that could not otherwise be described in the language.  (For example,
    some languages do not have call-by-value or certain data types.)

 *  Provides name translation for noncase-sensitive languages.

 *  Allows future extensibility without requiring source code changes.



MPE/iX 5.0 Documentation