|
|
Coerces an expression into a CST absolute code pointer
(ACPTR).
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
cst:cst (value:any)
- value
An expression to be coerced. All types are valid.
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. |
%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.
None
|