|
|
Coerces an expression into a CSTX absolute code pointer
(ACPTR).
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).
cstx:cstx (value:any)
- value
An expression to be coerced. All types are valid.
Table 10-3 Derivation of the CSTX 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. |
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. |
%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.
None
|