Int 21 Fn 52 U - Dos 2+ Internal - "sysvars" - Get List Of Lists [D]
AH = 52h
Return: ES:BX -> DOS list of lists (see #1313)
Notes: partially supported by OS/2 v1.1 compatibility box (however, most
pointers are FFFFh:FFFFh, LASTDRIVE is FFh, and the NUL header "next"
pointer is FFFFh:FFFFh).
partially supported by the Windows NT DOS box; contains only a
rudimentary Current Directory Structure (see #1331)
on return, ES points at the DOS data segment (see also INT 2F/AX=1203h)
Quarterdeck's suggested check for the use of its DOSDATA.SYS or
DOS-UP.SYS is to test whether the list-of-lists segment is greater
than the segment of the first memory block; a better check for
DOS-UP.SYS is INT 21/AX=2B01h/CX=444Dh
because not all DOS workalikes support all fields in the List of Lists,
applications should ensure that pointers are neither 0000h:0000h
nor FFFFh:FFFFh before using them
Windows for Workgroups 3.11 network and Windows95 set the path to
the local drive and directory even for network drives; in that
case the UNC form \\SERVER\SHARE can be obtained with
INT 21/AX=5F02h or INT 21/AX=5F46h. LapLink RemoteAccess does the
same even for INT 21/AX=5F02h
Windows95 GUI no longer returns the true path for a SUBSTed drive,
but MS-DOS 7.00 does; use INT 21/AH=60h to obtain the true name
See Also: INT 2F/AX=1203h
Format of List of Lists:
Offset Size Description (Table 1313)
-24 WORD (DOS 3.1+) contents of CX from INT 21/AX=5E01h
-22 WORD (DOS ???+) LRU counter for FCB caching
-20 WORD (DOS ???+) LRU counter for FCB opens
-18 DWORD (DOS ???+) address of OEM function handler (see INT 21/AH=F8h)
FFFFh:FFFFh if not installed or not available
-14 WORD (DOS ???+) offset in DOS CS of code to return from INT 21 call
-12 WORD (DOS 3.1+) sharing retry count (see AX=440Bh)
-10 WORD (DOS 3.1+) sharing retry delay (see AX=440Bh)
-8 DWORD (DOS 3.0+) pointer to current disk buffer
-4 WORD (DOS 3.0+) pointer in DOS data segment of unread CON input
when CON is read via a handle, DOS reads an entire line,
and returns the requested portion, buffering the rest
for the next read. 0000h indicates no unread input
-2 WORD segment of first memory control block (see #1314)
00h DWORD pointer to first Drive Parameter Block (see #1083 at AH=32h)
04h DWORD -> first System File Table (see #1325,#1326,#1327,#1328)
08h DWORD pointer to active CLOCK$ device's header (most recently loaded
driver with CLOCK bit set)
0Ch DWORD pointer to active CON device's header (most recently loaded
driver with STDIN bit set)
---DOS 2.x---
10h BYTE number of logical drives in system
11h WORD maximum bytes/block of any block device
13h DWORD pointer to first disk buffer (see #1335,#1336)
17h 18 BYTEs actual NUL device driver header (not a pointer!)
NUL is always the first device on DOS's linked list of device
drivers. (see #1332)
---DOS 3.0---
10h BYTE number of block devices
11h WORD maximum bytes/block of any block device
13h DWORD pointer to first disk buffer (see #1336,#1338)
17h DWORD pointer to array of current directory structures (see #1329)
1Bh BYTE value of LASTDRIVE command in CONFIG.SYS (default 5)
1Ch DWORD pointer to STRING= workspace area
20h WORD size of STRING area (the x in STRING=x from CONFIG.SYS)
22h DWORD pointer to FCB table
26h WORD the y in FCBS=x,y from CONFIG.SYS
28h 18 BYTEs actual NUL device driver header (not a pointer!)
NUL is always the first device on DOS's linked list of device
drivers. (see #1332)
---DOS 3.1-3.3---
10h WORD maximum bytes per sector of any block device
12h DWORD pointer to first disk buffer in buffer chain (see #1336)
16h DWORD pointer to array of current directory structures (see #1329)
1Ah DWORD pointer to system FCB tables (see #1326,#1327,#1328)
1Eh WORD number of protected FCBs (the y in the CONFIG.SYS FCBS=x,y)
20h BYTE number of block devices installed
21h BYTE number of available drive letters (largest of 5, installed
block devices, and CONFIG.SYS LASTDRIVE=). Also size of
current directory structure array.
22h 18 BYTEs actual NUL device driver header (not a pointer!)
NUL is always the first device on DOS's linked list of device
drivers. (see #1332)
34h BYTE number of JOIN'ed drives
---DOS 4.x---
10h WORD maximum bytes per sector of any block device
12h DWORD pointer to disk buffer info record (see #1338,#1339)
Note: although the initialization code in IO.SYS uses this
pointer, MSDOS.SYS does not, instead using the hardcoded
address of the info record
16h DWORD pointer to array of current directory structures
(see #1329,#1330)
1Ah DWORD pointer to system FCB tables (see #1326,#1327,#1328)
1Eh WORD number of protected FCBs (the y in the CONFIG.SYS FCBS=x,y)
(always 00h for DOS 5.0)
20h BYTE number of block devices installed
21h BYTE number of available drive letters (largest of 5, installed
block devices, and CONFIG.SYS LASTDRIVE=). Also size of
current directory structure array.
22h 18 BYTEs actual NUL device driver header (not a pointer!)
NUL is always the first device on DOS's linked list of device
drivers. (see #1332)
34h BYTE number of JOIN'ed drives
35h WORD pointer within IBMDOS code segment to list of special program
names (see #1348)
(always 0000h for DOS 5.0)
37h DWORD pointer to FAR routine for resident IFS utility functions
(see #1344)
may be called by any IFS driver which does not wish to
service functions 20h or 24h-28h itself
3Bh DWORD pointer to chain of IFS (installable file system) drivers
3Fh WORD the x in BUFFERS x,y (rounded up to multiple of 30 if in EMS)
41h WORD number of lookahead buffers (the y in BUFFERS x,y)
43h BYTE boot drive (1=A:)
44h BYTE flag: 01h to use DWORD moves (80386+), 00h otherwise
45h WORD extended memory size in KB
---DOS 5.0-6.0---
10h 39 BYTEs as for DOS 4.x (above)
37h DWORD pointer to SETVER program list or 0000h:0000h
3Bh WORD (DOS=HIGH) offset in DOS CS of function to fix A20 control
when executing special .COM format
3Dh WORD PSP of most-recently EXECed program if DOS in HMA, 0000h if low
used for maintaining count of INT 21 calls which disable A20
on return
3Fh 8 BYTEs as for DOS 4.x (above)
---Windows NT DOS Box---
10h 6 BYTEs ???
16h DWORD pointer to array of current directory structures (see #1331)
1Ah 6 BYTEs ???
20h BYTE number of block devices installed
21h BYTE number of local drive letters (= installed block devices)
Also size of current directory structure array.
22h 18 BYTEs actual NUL device driver header (not a pointer!)
NUL is always the first device on DOS's linked list of device
drivers. (see #1332)
Format of DOS memory control block:
Offset Size Description (Table 1314)
00h BYTE block type: 5Ah if last block in chain, otherwise 4Dh
01h WORD PSP segment of owner or special flag value (see #1315)
03h WORD size of memory block in paragraphs
05h 3 BYTEs unused by MS-DOS
(386MAX) if locked-out block, region start/prev region end
---DOS 2.x,3.x---
08h 8 BYTEs unused
---DOS 4.0+ ---
08h 8 BYTEs ASCII program name if PSP memory block or DR DOS UMB,
else garbage
null-terminated if less than 8 characters
Notes: the next MCB is at segment (current + size + 1)
under DOS 3.1+, the first memory block is the DOS data segment,
containing installable drivers, buffers, etc. Under DOS 4.0+ it is
divided into subsegments, each with its own memory control block
(see #1319), the first of which is at offset 0000h.
for DOS 5+, blocks owned by DOS may have either "SC" or "SD" in bytes
08h and 09h. "SC" is system code or locked-out inter-UMB memory,
"SD" is system data, device drivers, etc.
Some versions of DR DOS use only seven characters of the program name,
placing a NUL in the eighth byte.
See Also: #1316,#1318,#1319
(Table 1315)
Values for special flag PSP segments:
0000h free
0006h DR DOS XMS UMB
0007h DR DOS excluded upper memory ("hole")
0008h belongs to DOS
FFF7h 386MAX v6.01+ ???
FFFAh 386MAX UMB control block (see #1164 at AX=4402h"386MAX")
FFFDh 386MAX locked-out memory
FFFEh 386MAX UMB (normally immediately follows its control block)
FFFFh 386MAX v6.01+ device driver
Format of MS-DOS 5+ UMB control block:
Offset Size Description (Table 1316)
00h BYTE type: 5Ah if last block in chain, 4Dh otherwise
01h WORD first available paragraph in UMB if control block at start
of UMB, 000Ah if control block at end of UMB
03h WORD length in paragraphs of following UMB or locked-out region
05h 3 BYTEs unused
08h 8 BYTEs block type name: "UMB" if start block, "SM" if end block in UMB
See Also: #1314,#1317
Format of MS-DOS 7.0 HMA memory control block:
Offset Size Description (Table 1317)
00h WORD signature "MS" (4Dh 53h)
02h WORD usage flag???
0000h free
else ???
04h WORD size of memory block in bytes (not counting MCB)
06h WORD offset of next memory block in HMA or 0000h
08h 8 BYTEs unused (0)
See Also: #1314,#1316,#1318
Format of STARLITE (General Software's Embedded DOS) memory control block:
Offset Size Description (Table 1318)
00h BYTE block type: 5Ah if last block in chain, otherwise 4Dh
01h WORD PSP segment of owner, 0000h if free, 0008h if belongs to DOS
03h WORD size of memory block in paragraphs
05h BYTE unused
06h WORD segment address of next memory control block (0000h if last)
08h WORD segment address of previous memory control block or 0000h
0Ah 6 BYTEs reserved
Format of DOS 4.0+ data segment subsegment control blocks:
Offset Size Description (Table 1319)
00h BYTE subsegment type (blocks typically appear in this order)
"D" device driver
"E" device driver appendage
"I" IFS (Installable File System) driver
(MS-DOS 7) high-loaded drive data table array (see #2290)
"F" FILES= control block storage area (for FILES>5)
"X" FCBS= control block storage area, if present
"C" BUFFERS EMS workspace area (if BUFFERS /X option used)
"B" BUFFERS= storage area
"L" LASTDRIVE= current directory structure array storage area
"S" STACKS= code and data area, if present (see #1320,#1321)
"T" INSTALL= transient code
01h WORD paragraph of subsegment start (usually the next paragraph)
03h WORD size of subsegment in paragraphs
05h 3 BYTEs unused
08h 8 BYTEs for types "D" and "I", base name of file from which the driver
was loaded (unused for other types)
Format of data at start of STACKS code segment (if present):
Offset Size Description (Table 1320)
00h WORD ???
02h WORD number of stacks (the x in STACKS=x,y)
04h WORD size of stack control block array (should be 8*x)
06h WORD size of each stack (the y in STACKS=x,y)
08h DWORD pointer to STACKS data segment
0Ch WORD offset in STACKS data segment of stack control block array
0Eh WORD offset in STACKS data segment of last element of that array
10h WORD offset in STACKS data segment of the entry in that array for
.NG limit reached, continued in next section...