HPlogo System Debug Reference Manual: HP 3000 MPE/iX Computer Systems > Chapter 8 System Debug Standard Functions

func cstx

» 

Technical documentation

Complete book in PDF
» Feedback

 » Table of Contents

 » Index

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.

Table 8-3 Derivation of the CSTX Bit Pattern

Parameter TypeAction

BOOL

0.1 if TRUE, 0.0 if FALSE.

U16 S16

Set the high-order 32 bits (SID or segment part) to zero. Right justify the original 16-bit value in the low-order 32 bits (offset part) with zero fill.

U32 S32 SPTR

Set the high-order 32 bits (SID or segment part) to zero. Transfer the original bit pattern into the low-order 32 bits (offset part) unchanged.

LPTR SYS PROG USER GRP TRANS PUB CST LGRP CSTX LPUB

Transfer both parts of the address unchanged.

EADDR SADDR

Transfer both parts of the address, truncating the 32 high-order bits of the offset.

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

Feedback to webmaster