When the HP-3000 compatibility option is enabled, Kobol supports the 'CALL INTRINSIC' construct.
The Kobol package does NOT contain an MPE intrinsics emulation library. The compiler will correctly translate CALL INTRINSIC constructs to their C equivalent in the intermediate C-code. However, an MPE intrinsics emulation library must be provided by the user. Also, the program will include the file 'intrinsics.h'. This file must also be provided by the user.
The Kobol compiler will look up the called intrinsic in a file named COBINTR. Either this file must exist in the working directory, or an environment variable with the name COBINTR must be set up that contains the name of the intrinsic definition file. (see HP-3000 compatibilty plug-in.)
The COBINTR file is an ASCII text file. It contains one line for each defined intrinsic. The line starts with the intrinsic name (which is case sensitive), followed by a parameter definition string. The parameter definition string consists of an optional 'N' and one character per parameter. This character indicates wether the parameters is passed by address ('A') or by value (V). The optional character 'N' indicates that the first parameter is a hidden parameter, containing the parameter count.
Some examples:
FOPEN AVVVAAVVVVVVV HPCICOMMAND NAAAV
When an INTRINSIC is called, parameters will be passed by address or by value as required. Also, optional parameters can be omitted by using two consecutive backslashes as a place holder. This is consistent with the HP-3000 extensions to the CALL statement.