HP 3000 Manuals

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


System Debug Reference Manual

func cstx 

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

Syntax 

      cstx (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 CSTX function, the CM
search path is limited to the program file (PROG).

Formal Declaration 

      cstx:cstx (value:any)

Parameters 

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

          Derivation of the CSTX 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 cstx(12.304) 
     CSTX %12.304

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

     %cmdebug > wl cstx( sort ) 
     CSTX %4.3302

Print the address of the procedure named sort.  Note that the search path
used for procedure name lookups is restricted to the program file (PROG).

     %cmdebug > wl cstx(sys(24.630)) 
     CSTX %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