HPlogo System Debug Reference Manual > Chapter 10 System Debug Standard Functions

func strextract

MPE documents

Complete PDF
Table of Contents
Index

E0201 Edition 4 ♥
E0300 Edition 3
E0692 Edition 3

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.




func strdown


func strinput