DOS Fn 52H: Get DOS Variables
Compatibility: 2.0+? ◄undoc►
Expects: AH 52H
Returns: ES:BX address of DosVarsRec; addr+2 of segment of root MCB
Info: Also called the List of Lists function. This returns the address
of an undocumented package of DOS internal variables; some of the
values in this packet may be handy for use in utility programs.
See DosVarsRec for a layout of the data.
At ES:[BX-2], you will find a 2-byte value which is the segment
of the fabled "root Memory Control Block". The root MCB can be
used to traverse the chain of MCBs and accumulate information
about all of the memory blocks that are currently allocated.
Each MCB contains its owner's PID so when a recognizable PSP is
found, you may be able to trace down its environment segment and
therefore obtain the programs filename as well the DOS command-
line parameters used when it was started.
Warning: ■ Alters the value of the ES segment register.
■ This undocumented fn may change in future versions of DOS. It
was conspicuously not documented in DOS 5.0 (which did document
most of DOS's secrets).
See Also: DosVarsRec