HP 3000 Manuals

func cst [ System Debug Reference Manual ] MPE/iX 5.0 Documentation


System Debug Reference Manual

func cst 

Coerces an expression into a CST absolute code pointer (ACPTR).

Syntax 

      cst (value)

CM program segments are loaded into the CSTX. CM library segments are
loaded into the CST.

During the evaluation of the parameter to the CST function, the following
CM search path is used for procedure name lookups:

    GRP, PUB, LGRP, LPUB, SYS

Formal Declaration 

      cst:cst (value:any)

Parameters 

 value           An expression to be coerced.  All types are valid.

          Derivation of the CST Bit Pattern 

--------------------------------------------------------------------------------------------
|                           |                                                              |
|      Parameter Type       |                            Action                            |
|                           |                                                              |
--------------------------------------------------------------------------------------------
|                           |                                                              |
| BOOL                      | 0.1 if TRUE, 0.0 if FALSE.                                   |
|                           |                                                              |
--------------------------------------------------------------------------------------------
|                           |                                                              |
| U16                       | Set the high-order 32 bits (SID or segment part) to zero.    |
| S16                       | Right justify the original 16-bit value in the low-order 32  |
|                           | bits (offset part) with zero fill.                           |
|                           |                                                              |
--------------------------------------------------------------------------------------------
|                           |                                                              |
| U32                       | Set the high-order 32 bits (SID or segment part) to zero.    |
| S32                       | Transfer the original bit pattern into the low-order 32 bits |
| SPTR                      | (offset part) unchanged.                                     |
|                           |                                                              |
--------------------------------------------------------------------------------------------
|                           |                                                              |
| LPTR   SYS                | Transfer both parts of the address unchanged.                |
| PROG   USER               |                                                              |
| GRP    TRANS              |                                                              |
| PUB    CST                |                                                              |
| LGRP   CSTX               |                                                              |
| LPUB                      |                                                              |
|                           |                                                              |
--------------------------------------------------------------------------------------------
|                           |                                                              |
| STR                       | Transfer the ASCII bit pattern for the last eight characters |
|                           | in the string.  Strings shorter than eight characters are    |
|                           | treated as if they were extended on the left with nulls.     |
|                           |                                                              |
--------------------------------------------------------------------------------------------

Examples 

     %cmdebug > wl cst(12.304) 
     CST %12.304

Coerce the simple long pointer into a CST absolute code pointer.

     %cmdebug > wl sort  
     PROG %4.3302

     %cmdebug > wl grp (sort) 
     GRP %2.1364

     %cmdebug > wl cst (sort) 
     CST %73.1364

Print the address of the procedure named sort.  The first lookup uses the
standard procedure name lookup search path and finds the procedure sort
in the program file.  The second lookup restricts the search path to the
group library, and another sort procedure is located.  The third lookup
restricts the search path to all of the currently loaded libraries, and
the second procedure is located again (within the group library).

     %cmdebug > wl cst(sys(24.630)) 
     CST %24.630

The coercion simply changes the associated absolute file.  Note that no
complicated conversion or range checking is performed.

Limitations, Restrictions 

none



MPE/iX 5.0 Documentation