HPlogo MPE/iX Intrinsics Reference Manual > Chapter 8 Command Definitions (HPMERGEEND-LOGSTATUS)

HPSWTONMPLABEL

MPE documents

Complete PDF
Table of Contents
Index

Edition 7 E0701 ♥
Edition 7 E0300
Edition 6 E0195

CM callable only.

Allows CM user programs, user libraries, and system code to invoke NM procedures as follows:
  • Convert CM references in the argument list to virtual NM addresses.

  • Change the execution mode.

  • Invoke the NM procedure specified by the CM caller.

Syntax



  I32                       U32V  I16V    I16      I16
  status := HPSWTONMPLABEL (proc, nparms, arglist, argdesc,
                            I16V
                            functype);

Functional Return


status

I32 (assigned functional return)

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

Parameters


proc

32-bit unsigned integer by value (required)

Passes the NM plabel of the target procedure name. This plabel is usually obtained by calling the HPLOADNMPROC intrinsic.

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 argdesc. Account for any hidden parameters (such as, parameters, an extensible parameter list, and so forth).

arglist

16-bit signed integer array by reference (required)

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

argdesc

16-bit signed integer array by reference (required)

Passes integer codes describing the parameters held in the arglist array (that is, byte, word, double, pointer, and so forth).

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 the Switch Programming Guide for supported function types.

Operation Notes


Do not use HPSWTONMPLABEL 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 required because lengths are implied in the descriptor list.

Related Information


Intrinsics HPFIRSTLIBRARY, HPGETPROCPLABEL, HPLOADCMPROCEDURE, HPLOADNMPROC, HPSETCCODE, HPSWITCHTOCM, HPSWITCHTONMNAME, HPUNLOADCMPROCEDURE, LOADPROC, UNLOADPROC
Manuals Switch Programming Guide




HPSWTONMNAME


HPUNLOADCMPROCEDURE