System Debug Reference Manual (32650-90888)

450 Chapter10
System Debug Standard Functions
func strextract
Limitations, Restrictions
none
func strextract
String extract. Returns a string (extracted) from the specified virtual address.
Syntax
strextract (
virtaddr
[
length
])
Formal Declaration
strextract:str (
virtaddr
:ptr [
length
:u16=$4])
Parameters
virtaddr
The virtual address of the start of the string.
Virtaddr
can be a short pointer, a long pointer, or a full logical code
pointer.
length
The number of characters to retrieve starting at
virtaddr
. If this
parameter is not specified, the string returned will be four characters long.
If the value given in
length
is greater than the maximum string size, the
string returned is truncated to the maximum size.
Examples
$nmdebug > dv r28, 4, a
VIRT $12f.4000d638 ASCII EXCL USIV E VI OLAT
$nmdebug > wl strextract (r28, 9)
EXCLUSIVE
Register R28 is used as the virtual address at which a nine-character string is extracted.
$nmdebug > var tblname strextract(b0002c40)
The variable tblname is assigned a four-character string which is extracted from the
virtual address defined by the short pointer (b0002c40).
Limitations, Restrictions
If length is greater than the maximum supported string length (see the STRMAX function),
only up to STRMAX characters are returned.