HP 3000 Manuals

HPSWTONMNAME [ MPE/iX Intrinsics Reference Manual ] MPE/iX 5.0 Documentation


MPE/iX Intrinsics Reference Manual

HPSWTONMNAME 

CM callable only.

Allows CM user programs, user libraries, and system code to invoke NM
procedures as follows:

   *   Convert CM references in an argument list to virtual NM addresses.

   *   Change the execution mode.

   *   Invoke the NM procedure specified by the CM caller.

Syntax 
_____________________________________________________________
|                                                           |
|                           CA       I16V    CA    I16V     |
|     status:= HPSWTONMNAME(procname,proclen,libname,liblen,|
|                   I16V    I16   I16     I16V              |
|                  nparms,arglist,argdesc,functype)         |
_____________________________________________________________

            

Functional Return 

status                I32 (assigned functional return) 

                      Returns a 32-bit integer indicating the status of
                      the call.

Parameters 

procname              character array by reference (required) 

                      Passes the target procedure name.  The target
                      procedure must be contained in an executable
                      library (XL). If the value of procname is invalid,
                      blank, or does not contain the NM procedure,
                      NL.PUB.SYS is searched.

proclen               16-bit signed integer by value (required) 

                      Passes the byte length of the procedure name.

libname               character array by reference (required) 

                      Passes the name of the NM library to be searched.
                      If the value of libname is invalid, blank or does
                      not contain the NM procedure, NL.PUB.SYS is
                      searched.

                      __________________________________________________ 

                      NOTE  By default, the search for the referenced
                            library occurs in the procedure's group and
                            account.  In order to reference a library in
                            some other group and/or account, you must be
                            sure that libname is a fully qualified name
                            (name.group.account)

                      __________________________________________________ 

liblen                16-bit signed integer by value (required) 

                      Passes the byte length of the library name.

nparms                16-bit signed integer by value (required) 

                      Passes the number of parameters to be passed to the
                      target NM procedure.  It specifies the length of
                      the argdesc array.  Account for any hidden
                      parameters (for example, parameters, an extensible
                      parameter list, and so forth).  For more
                      information on hidden parameters, refer to the
                      Hewlett-Packard Pascal/XL Reference Manual 
                      (31502-90002).

arglist               16-bit signed integer array by reference (required) 

                      Passes the actual parameters to be passed in the NM
                      procedure.

argdesc               16-bit signed integer array by reference (required) 

                      Passes integer codes describing the parameters held
                      in the arglist array.  Refer to Switch Programming 
                      Guide (32650-90014) for code descriptions.

functype              16-bit signed integer by value (required) 

                      Passes the data type of the value the target
                      procedure returns if it is a function.  If the
                      target is not a function, the value of this
                      parameter is zero.  Refer to Switch Programming 
                      Guide (32650-90014) for possible values.

Operation Notes 

Do not use HPSWTONMNAME to invoke a native mode (NM) system supplied
intrinsic.  The result of the call may be unpredictable.

NM code can address the entire CM stack, so there is no copying of
reference parameters.  The length of each parameter is not needed because
lengths are implied in the descriptor list.

Switches by name involve high system overhead on the first call per name,
but substantially lower overhead on each subsequent call for that name.
The HPSWTONMNAME, HPSWITCHTOCM, HPLOADCMPROCEDURE, and HPLOADNMPROC
intrinsics perform a hashing function on the name of the other-mode
procedure and store the plabel for that procedure in a system internal
hash table.  The LOADPROC intrinsic, does not perform hashing and
involves high system overhead each time it is called.

The strings supplied as values of the procname and libname parameters
must exactly match the names of the target NM routine and its NM library,
respectively.


NOTE By default, the search for the referenced library occurs in the procedure's group and account. In order to reference a library in some other group and/or account, you must be sure that libname is a fully qualified name (name.group.account)
Related Information Intrinsics None Commands None Manuals Switch Programming Guide (32650-90014)


MPE/iX 5.0 Documentation