HP 3000 Manuals

HPLOADCM PROCEDURE Intrinsic [ Switch Programming User's Guide ] MPE/iX 5.0 Documentation


Switch Programming User's Guide

HPLOADCM PROCEDURE Intrinsic 

Switching by name incurs the overhead of forming a hash probe out of the
procedure's name and finding the name in a hash table in order to obtain
the procedure's plabel.

You can eliminate this overhead by obtaining the target procedure's
plabel through the Switch support intrinsic function HPLOADCMPROCEDURE.
You then supply the result returned by HPLOADCMPROCEDURE as the value of
the proc parameter in the call to the HPSWITCHTOCM intrinsic.


NOTE This method is to your advantage only if you make many calls to the same procedure. Otherwise, no overhead is saved.
Syntax In HP Pascal/XL, the declaration of the HPLOADCMPROCEDURE intrinsic is as follows: FUNCTION HPLOADCMPROCEDURE : SHORTINT; INTRINSIC; Next, an example of an HP Pascal/XL call to this function: plabel := HPLOADCMPROCEDURE(proc, lib, status); You call the HPLOADCMPROCEDURE intrinsic with three parameters. These parameters provide the following information: * ASCII procedure name * Indicator of the CM SL to be searched * Status record to report on HPLOADCMPROCEDURE's operation Parameters A detailed explanation of the parameters of the HPLOADCMPROCEDURE intrinsic follows. Required parameters are shown in boldface; optional parameters are shown in italics. proc character array (required) Passes an ASCII procedure name, left-justified and blank-padded. The name can have a maximum of 15 characters. The name is padded with blanks to a length of 16. lib 8-bit unsigned integer (optional) Passes indicator of the CM SL to be searched. The valid values are as follows: 0 Search the system SL only. 1 Search the logon account SL, then the system SL. 2 Search the logon group SL first, the logon account SL second, and the system SL last. 3 Search the program file's account SL, then the system SL. 4 Search the program file's group SL first, the program file's account SL second, and the system SL last. The system SL is the default. status status-record (optional) Returns the status of the intrinsic call. If no errors or warnings are encountered, status returns 32 bits of zero. If errors or warnings are encountered, status is interpreted as two 16-bit fields. The HP Pascal/XL declaration of this record is as follows: XLSTATUS = RECORD CASE INTEGER OF 0 : (all : INTEGER); 1 : (info : SHORTINT; subsys : SHORTINT); END; {record} Bits (0:16) comprise status.info. A negative value indicates an error condition, and a positive value indicates a warning condition. Bits (16:16) comprise status.subsys. The value represented by these bits defines the subsystem that set the status information. The Switch subsystem identification number is 100. The values of status.info that can be returned from a call to HPLOADCMPROCEDURE (or HPUNLOADCMPROCEDURE) are listed in Table 3-3. These numbers are derived as follows: - |CM Loader Error Number| - 1000.
CAUTION Since HPLOADCMPROCEDURE can return information on the success of its execution in the status parameter, it is good programming practice to specify this parameter and check its value after the intrinsic call. If an error or warning condition is encountered and you did not specify the status parameter, HPLOADCMPROCEDURE causes the calling process to abort.
Table 3-3. CM Loader Status Returns (Page 1) ----------------------------------------------------------------------------- | Status Code | Meaning | ----------------------------------------------------------------------------- | -1020 | Illegal library search. | ----------------------------------------------------------------------------- | -1021 | Unknown entry point. | ----------------------------------------------------------------------------- | -1022 | The TRACE subsystem is not present. | ----------------------------------------------------------------------------- | -1023 | The stack size is too small. | ----------------------------------------------------------------------------- | -1024 | Maxdata is greater than 32K. | ----------------------------------------------------------------------------- | -1025 | The data segment is greater than the maxdata segment. | ----------------------------------------------------------------------------- | -1026 | The program is loaded in the opposite mode. | ----------------------------------------------------------------------------- | -1027 | SL binding error. | ----------------------------------------------------------------------------- | -1028 | Invalid system SL file. | ----------------------------------------------------------------------------- | -1029 | Invalid public SL file. | ----------------------------------------------------------------------------- | -1030 | Invalid group SL file. | ----------------------------------------------------------------------------- | -1031 | Invalid program file. | ----------------------------------------------------------------------------- | -1032 | Invalid list file. | ----------------------------------------------------------------------------- | -1033 | The code segment is greater than the system maximum. | ----------------------------------------------------------------------------- | -1034 | The program uses more than one extent. | ----------------------------------------------------------------------------- | -1035 | The data segment is greater than 32K. | ----------------------------------------------------------------------------- | -1036 | The data segment is greater than the system maximum. | ----------------------------------------------------------------------------- | -1037 | The number of code segments is greater than 63. | ----------------------------------------------------------------------------- | -1038 | The number of code segments is greater than the | | | system maximum. | ----------------------------------------------------------------------------- | -1039 | Illegal capability. | ----------------------------------------------------------------------------- | -1040 | Too many procedures are loaded. | ----------------------------------------------------------------------------- | -1041 | Unknown procedure name. | ----------------------------------------------------------------------------- | -1042 | Invalid procedure number. | ----------------------------------------------------------------------------- Table 3-3. CM Loader Status Returns (Page 2) ----------------------------------------------------------------------------- | Status Code | Meaning | ----------------------------------------------------------------------------- | -1043 | Illegal procedure unload. | ----------------------------------------------------------------------------- | -1044 | Illegal SL capability. | ----------------------------------------------------------------------------- | -1045 | Invalid entry point. | ----------------------------------------------------------------------------- | -1050 | Unable to open system SL file. | ----------------------------------------------------------------------------- | -1051 | Unable to open public SL file. | ----------------------------------------------------------------------------- | -1052 | Unable to open group SL file. | ----------------------------------------------------------------------------- | -1053 | Unable to open program file. | ----------------------------------------------------------------------------- | -1054 | Unable to open list file. | ----------------------------------------------------------------------------- | -1055 | Unable to close system SL file. | ----------------------------------------------------------------------------- | -1056 | Unable to close public SL file. | ----------------------------------------------------------------------------- | -1057 | Unable to close group SL file. | ----------------------------------------------------------------------------- | -1058 | Unable to close program file. | ----------------------------------------------------------------------------- | -1059 | Unable to close list file. | ----------------------------------------------------------------------------- | -1060 | EOF or I/O error on system SL file. | ----------------------------------------------------------------------------- | -1061 | EOR or I/O error on public SL file. | ----------------------------------------------------------------------------- | -1062 | EOF or I/O error on group SL file. | ----------------------------------------------------------------------------- | -1063 | EOF or I/O error on program file. | ----------------------------------------------------------------------------- | -1064 | EOF or I/O error on list file. | ----------------------------------------------------------------------------- | -1065 | Unable to obtain CST entries. | ----------------------------------------------------------------------------- | -1066 | Unable to obtain process DST entry. | ----------------------------------------------------------------------------- | -1067 | Unable to obtain mail data segment. | ----------------------------------------------------------------------------- | -1068 | Unable to obtain working set. | ----------------------------------------------------------------------------- | -1069 | Unable to obtain CSTX entries. | ----------------------------------------------------------------------------- Table 3-3. CM Loader Status Returns (Page 3) ----------------------------------------------------------------------------- | Status Code | Meaning | ----------------------------------------------------------------------------- | -1070 | Segment Table overflow. | ----------------------------------------------------------------------------- | -1071 | Unable to obtain sufficient DL storage. | ----------------------------------------------------------------------------- | -1072 | ATTIO error. | ----------------------------------------------------------------------------- | -1073 | Unable to obtain virtual memory. | ----------------------------------------------------------------------------- | -1074 | Directory I/O error. | ----------------------------------------------------------------------------- | -1075 | Print I/O error. | ----------------------------------------------------------------------------- | -1076 | Illegal DLSIZE. | ----------------------------------------------------------------------------- | -1080 | The program is already allocated. | ----------------------------------------------------------------------------- | -1081 | Illegal program allocation. | ----------------------------------------------------------------------------- | -1082 | The program is not allocated. | ----------------------------------------------------------------------------- | -1083 | Illegal program deallocation. | ----------------------------------------------------------------------------- | -1084 | The procedure is already allocated. | ----------------------------------------------------------------------------- | -1085 | Illegal procedure allocation. | ----------------------------------------------------------------------------- | -1086 | The procedure is not allocated. | ----------------------------------------------------------------------------- | -1087 | Illegal procedure deallocation. | ----------------------------------------------------------------------------- | -1092 | ALLOCATE/DEALLOCATE from non-system disc. | ----------------------------------------------------------------------------- | -1093 | Unable to mount program's home volume set. | ----------------------------------------------------------------------------- | -1094 | Unable to mount system SL's home volume set. | ----------------------------------------------------------------------------- | -1095 | Unable to mount private SL's home volume set. | ----------------------------------------------------------------------------- | -1096 | Unable to mount group SL's home volume set. | ----------------------------------------------------------------------------- | -1097 | Unable to load remote program. | ----------------------------------------------------------------------------- | -1098 | Unable to convert old format. | ----------------------------------------------------------------------------- | -1099 | Unable to obtain DST for logical map. | ----------------------------------------------------------------------------- Table 3-4. Table 3-3. CM Loader Status Returns (Page 4) ----------------------------------------------------------------------------- | Status Code | Meaning | ----------------------------------------------------------------------------- | -1100 | There are too many mapped segments. | ----------------------------------------------------------------------------- | -1101 | The SEGMAP is too big. | ----------------------------------------------------------------------------- | -1102 | Unable to expand SEGMAP. | ----------------------------------------------------------------------------- | -1103 | There are too many dynamic loads on the procedure. | -----------------------------------------------------------------------------


MPE/iX 5.0 Documentation