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
is an address specification that points to the one word length field of the next memory specification. This format can be symbolic_name+nnnnnnnn where symbolic_name is a symbolic memory location and nnnnnnnn is the offset from that symbolic address. The length_spec can also be Flat Register Form. or Segment Register Form.
is a mandatory parameter that identifies the level of indirection to be used on the length_spec. It is one of:
D[IRECT]
I[NDIRECT][*[{+|-}iiiiiiii]]...
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)