System Debug Reference Manual (32650-90888)

24 Chapter2
User Interface
Data Types
The most frequently used pointer types are
long pointer
(LPTR) and
short pointer
(SPTR). An LPTR is simply a pair of 32-bit numbers separated by a dot, sometimes called a
dotted pair. What the two numbers actually mean is unspecified by the type. Instead, the
context in which the LPTR is used determines the meaning. An SPTR is just one 32-bit
number, and it is often thought of as being the low-order (rightmost) part of an LPTR. When
used in CM, both long and short pointer values are often range-checked to verify that they
fit within 16 bits.
The remaining pointer types are variations of long pointers (that is, they are all dotted
pairs). However, unlike LPTRs, they project an additional meaning on the dotted pair. Since
the interpretation of pointers is heavily dependent on the mode of System Debug, the rest
of this discussion deals with each mode individually.
Compatibility Mode Pointers
An LPTR in CM is usually a
segment.offset
. If a CM LPTR refers to data, then the
segment number is the DST number of the addressed data segment, and the offset is the
CM word offset from the beginning of the segment. If a CM LPTR refers to code, there are
many possible interpretations of the segment number, and without additional information
the LPTR is ambiguous. It is for this reason that the additional long pointer types exist.
Their purpose is to differentiate LPTRs. Most users who work with CM code are probably
familiar with the logical code segment numbers assigned by the Segmenter. The
Segmenter's -PREP command assigns logical code segment numbers to program file
segments, while the -ADDSL command assigns logical code segment numbers to SL file
segments. These segment numbers always begin with zero (0) in each program or SL file.
System Debug allows users to refer to loaded CM code using these logical code segment
numbers through use of the following logical code pointer types:
PROG Program file long pointer.
GRP Group library file long pointer.
PUB Public library file long pointer.
LGRP Logon group library file long pointer.
LPUB Logon public library file long pointer.
SYS System library file long pointer.
Logon group and public libraries are loaded only by the CM LOADPROC intrinsic.
The above long pointer subtypes are by far the preferred choice for specifying code
addresses. Since System Debug also displays CM code addresses logically, it usually is not
necessary to refer to CM code segments by the CST/CSTX segment numbers assigned to
them by the CM loader. However, low-level system debugging sometimes requires this
method of addressing, and it is supported by the following absolute code pointer types:
CST Absolute CST long pointer.
CSTX Absolute CSTX long pointer.
CM program segments are assigned numbers in the CSTX, while CM SL segments are
assigned numbers in the CST. CST and CSTX segment numbers start with 1. The
following illustration depicts the relationships between CM logical code segment numbers
and absolute ones.