System Debug Reference Manual (32650-90888)

382 Chapter10
System Debug Standard Functions
func cmproclen
Limitations, Restrictions
The names and addresses of nested CM procedures, such as procedure three, are not
available within the CM FPMAP records. Addresses which fall within nested procedures
(three) are returned as offsets relative to the parent procedure (two).
func cmproclen
Returns the length of the CM procedure which contains the specified CM logical code
address.
Syntax
cmproclen (
cmlogaddr
)
The procedure length (from procedure start to procedure end) is returned in CM (16-bit)
words.
Formal Declaration
cmproclen:u16 (
cmlogaddr
:lcptr)
Parameters
cmlogaddr
The CM logical code address of a procedure whose length is desired.
Cmlogaddr
must be a full CM logical code address (LCPTR). For example:
CMPC Current CM program counter
CMPW+4 Top of CM program window + 4
PROG(2.102) Program file logical seg 2 offset 102
fopen+102 CM procedure fopen + %102 (assumes CM mode)
cmaddr('fopen')+%102 CM procedure fopen + %102 (NM or CM
mode)
Examples
%cmdebug > wl cmproclen(cmpc)
%843
Print the length of the current CM procedure located at the CM program counter CMPC.
%cmdebug > wl cmproclen(fopen)
%1642
Print the length of the CM procedure fopen.
Assume that the following single segment CM program has been compiled, linked with the
PMAP and FPMAP options, and is now being executed: