System Debug Reference Manual (32650-90888)

392 Chapter10
System Debug Standard Functions
func cst
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.
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,
Table 10-2. Derivation of the CST Bit Pattern
Parameter Type Action
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.
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.