System Debug Reference Manual (32650-90901)
462 Chapter10
System Debug Standard Functions
func symconst
addr
contains the address of a StudentRecord data structure in virtual memory. The
following code fragment is from this file:
CONST MINGRADES = 1; MAXGRADES = 10;
MINSTUDENTS = 1; MAXSTUDENTS = 5;
TYPE
GradeRange = MINGRADES .. MAXGRADES;
GradesArray = ARRAY [ GradeRange ] OF integer;
Class = ( SENIOR, JUNIOR, SOPHOMORE, FRESHMAN );
NameStr = string[8];
StudentRecord = RECORD
Name : NameStr;
Id : Integer;
Year : Class;
NumGrades : GradeRange;
Grades : GradesArray;
END;
$nmdebug > wl SYMADDR("StudentRecord.Name")
$0
Print the byte offset of the name field for StudentRecord. Since it is the first item in the
record, its offset is zero.
$nmdebug > wl SYMADDR("StudentRecord.NumGrades" 1)
$a8
Print the bit offset of the NumGrades field for StudentRecord.
$nmdebug > wl SYMADDR("StudentRecord.Grades[4]" #32)
$9
Print the word offset of the fourth element of the grades field for StudentRecord.
Limitations, Restrictions
none
func symconst
Returns the value of a declared constant.
Syntax
symconst (
pathspec
)