HP 3000 Manuals

System Debug Standard Functions [ System Debug Reference Manual ] MPE/iX 5.0 Documentation


System Debug Reference Manual

Chapter 8  System Debug Standard Functions 

This chapter presents the full formal declaration for each of the
standard functions which are defined in System Debug.

All functions are callable from both DAT and Debug.  All functions can be
called from both Native Mode (NM) and Compatibility Mode (CM). Some
functions, however, deal specifically with NM or CM attributes.  Input
parameters are always interpreted based on the current mode, so care must
be exercised when specifying procedure names and numeric literals.

Functions are logically divided into groups and can be listed with the
FUNCL[IST] command, filtered by the group name.

The following table lists all functions, sorted by group name.  For each
function, the name, type, and a brief description is presented.

COERCION Functions 

    Name       Type       Description 
    ASCC       : STR      Coerces an expression to ASCII
    BOOL       : BOOL     Coerces an expression to Boolean
    CST        : CST      Coerces an expression to CST ACPTR
    CSTX       : CSTX     Coerces an expression to CSTX ACPTR
    GRP        : GRP      Coerces an expression to GRP LCPTR
    LGRP       : LGRP     Coerces an expression to LGRP LCPTR
    LPUB       : LPUB     Coerces an expression to LPUB LCPTR
    PUB        : PUB      Coerces an expression to PUB LCPTR
    S16        : S16      Coerces an expression to signed 16-bit INT
    S32        : S32      Coerces an expression to signed 32-bit INT
    S64        : S64      Coerces an expression to signed 64-bit INT
    SPTR       : SPTR     Coerces an expression to short pointer
    SYS        : SYS      Coerces an expression to SYS LCPTR
    TRANS      : TRANS    Coerces an expression to TRANS LCPTR
    USER       : USER     Coerces an expression to USER LCPTR
    U16        : U16      Coerces an expression to unsigned 16-bit INT
    U32        : U32      Coerces an expression to unsigned 32-bit INT

UTILITY Functions 

    Name              Type       Description 
    ASC               : STR      Converts an expression to an ASCII string
    BIN               : INT      Converts an ASCII string to binary value
    BITD              : ANY      Bit deposit
    BITX              : ANY      Bit extract
    BOUND             : STR      Tests for current definition of an operand
    CISETVAR          : BOOL     Sets a new value for a CI variable
    CIVAR             : ANY      Returns the current value of a CI variable
    ERRMSG            : STR      Returns an error message string
    MACBODY           : STR      Returns the macro body of a specified macro
    TYPEOF            : STR      Returns the type of an expression
    MAPINDEX          : U16      Returns the index number of a mapped file
    MAPSIZE           : U32      Returns the size of a mapped file
    MAPVA             : LPTR     Returns the virtual address of a mapped file

ADDRESS Functions 

    Name           Type         Description 
    ABSTOLOG       : LCPTR      CM absolute address to logical code address
    BTOW           : U16        Converts a CM byte offset to a word offset
    CMNODE         : LCPTR      CM address of closest CM node point
    CMTONMNODE     : TRANS      NM address of closest CM node point
    CMVA           : LPTR       Converts CM code address to a virtual address
    DSTVA          : LPTR       Converts CM dst.off to virtual address
    HASH           : S32        Hashes a virtual address
    LOGTOABS       : ACPTR      CM logical code address to absolute address
    LTOLOG         : LCPTR      Long pointer to logical code address
    LTOS           : SPTR       Long pointer to short pointer
    NMNODE         : TRANS NM   Address of closest NM node point
    NMTOCMNODE     : LCPTR      CM address of closest NM node point
    OFF            : U32        Extracts offset part of a virtual address
    PHYSTOLOG      : LCPTR      CM physical segment/map bit to logical
    RTOV           : LPTR       real to virtual
    SID            : U32        Extracts the SID (space) part of a long pointer
    STOL           : LPTR       Short pointer to long pointer
    STOLOG         : LCPTR      Short pointer to logical code address
    VTOR           : U32        Virtual to real
    VTOS           : LPTR       Virtual to secondary store

PROCESS Functions 

    Name              Type       Description 
    CMG               : SPTR     Short pointer address of CMGLOBALS record
    CMSTACKBASE       : LPTR     Virtual address of the CM stack base
    CMSTACKDST        : U16      Data segment number of the CM stack
    CMSTACKLIMIT      : LPTR     Virtual address of the CM stack limit
    NMSTACKBASE       : LPTR     Virtual address of the NM stack base
    NMSTACKLIMIT      : LPTR     Virtual address of the NM stack limit
    PCB               : SPTR     Address of process control block
    PCBX              : SPTR     Address of process control block extension
    PIB               : SPTR     Address of process information block
    PIBX              : SPTR     Address process information block extension
    PSTATE            : STR      Returns the process state for specified PIN
    TCB               : U32      Real address of the task control block
    VAINFO            : ANY      Returns virtual object information

PROCEDURE Functions 

    Name              Type       Description 
    CMADDR            : LCPTR    Logical address of a CM procedure name
    CMBPADDR          : LCPTR    Logical address of a CM breakpoint index
    CMBPINDEX         : S16      Index number of a CM breakpoint address
    CMBPINSTR         : S16CM    Instruction at a CM breakpoint address
    CMENTRY           : LCPTR    Logical entry address of a CM procedure
    CMPROC            : STR      Returns the name of a CM procedure
    CMPROCLEN         : U16      Returns the length of CM procedure
    CMSEG             : STR      Returns the CM segment name at logical address
    CMSTART           : LCPTR    Logical start address of CM procedure
    NMADDR            : LCPTR    Logical address of NM procedure name
    NMBPADDR          : LCPTR    Logical address of NM breakpoint index
    NMBPINDEX         : S16      Index number of a NM breakpoint address
    NMBPINSTR         : S32NM    Instruction at a NM breakpoint address
    NMCALL            : S32NM    Dynamically invokes the specified NM routine
    NMENTRY           : LCPTR    Logical entry address of NM procedure
    NMFILE            : STR      Name of file containing NM logical address
    NMMOD             : STR      Name of NM module at NM logical address
    NMPATH            : STR      Returns the full code path of a NM procedure
    NMPROC            : STR      Name of NM procedure at NM logical address

STRING Functions 

    Name              Type       Description 
    STR               : STR      Extracts a substring from a string
    STRAPP            : STR      String append
    STRDEL            : STR      String delete
    STRDOWN           : STR      Downshifts a string
    STREXTRACT        : STR      Extracts a string at a virtual address
    STRINPUT          : STR      Prompts for and reads string input
    STRINS            : STR      String insert
    STRLEN            : U16      Returns the current length of a string
    STRLTRIM          : STR      Removes leading blanks from a string
    STRMAX            : U16      Returns the maximum length of a string
    STRPOS            : U16      Locates a substring within a string
    STRRPT            : STR      String repeat
    STRRTRIM          : STR      Removes trailing blanks from a string
    STRUP             : STR      Upshifts a string
    STRWRITE          : STR      Builds a string from a value list

SYMBOLIC Functions 

    Name              Type       Description 
    SYMADDR           : U32      Returns the offset within a type to the specified
                                 symbolic field
    SYMCONST          : ANY      Returns the value of a declared constant
    SYMINSET          : BOOL     Tests for set inclusion
    SYMLEN            : U32      Returns the length of the field based on a symbolic
                                 path
    SYMTYPE           : STR      Returns the symbolic type based on a symbolic path
    SYMVAL            : ANY      Returns the value found at a virtual address based on a
                                 symbolic path

The formal declaration of functions are presented with the following
format:

     function_name : function_return_type ( function_ parameters )

The function parameters are presented as follows:

     parm_name : parm_type [=default_parm_value]



MPE/iX 5.0 Documentation