The LEN parameter is an optional keyword parameter that defines the length of the variable length record that will follow in the next MEM or MEM32 statement.
LEN=(length_spec,flag),
where:
length_spec
D[IRECT] I[NDIRECT][*[{+|-}iiiiiiii]]...
DIRECT implies that the length_spec specifies a memory location that contains the length of the variable length record.
INDIRECT means that the length_spec contains an address and is dereferenced to obtain the memory location. The optional asterisks denote the level of indirection, one for each level. The indirect offsets iiiiiiii are added to or subtracted from the value found at the given level of indirection.
The following are example LEN statements followed by the memory statement whose length they describe.
TRACE MINOR=....., /* Symbol vrecord is a record whose first field is a one */ /* word value that is the total length of the entire */ /* variable length record. */ LEN=(vrecord,DIRECT), MEM=(.vrecord,DIRECT,LEN), /* Symbol vrec_ptr is a pointer to a variable length record */ /* and vend_ptr is a pointer to the end of the same record. */ /* The second field (10 bytes from end of record) is total */ /* length of the variable length record. */ LEN=(vend_ptr,INDIRECT*-10), MEM=(.vrec_ptr,INDIRECT,LEN), /* Symbol vrec_ptr is a pointer to a variable length record.*/ /* The second field (2 bytes from beginning of record) is */ /* total length of the variable length record. */ LEN=(vrec_ptr,INDIRECT*+2), MEM=(.vrec_ptr,INDIRECT,LEN), /* Symbol ind_ptr is a pointer to a structure. The third */ /* field in the structure (6 bytes from beginning) is a */ /* pointer to a variable record. The fourth field in the */ /* variable length record (8 bytes from beginning) is the */ /* total length of this variable length record. */ LEN=(ind_ptr,INDIRECT*+6*+8), MEM=(.ind_ptr,INDIRECT*+6*,LEN), /* If DS:DI contains the address of ind_ptr, to perform */ /* the above logging, the statements would be: */ LEN=(RDS+DI,INDIRECT*+6*+8), MEM=(RDS+DI,INDIRECT*+6*,LEN)