4fh word offset In Current Directory Path Of Backslash Corresponding To
root directory for drive
this value specifies how many characters to hide from the
"CHDIR" and "GETDIR" calls; normally set to 2 to hide the
drive letter and colon, SUBST, JOIN, and networks change it
so that only the appropriate portion of the true path is
visible to the user
---DOS 4.0+ ---
51h BYTE (DOS 4 only, remote drives) device type
04h network drive
52h DWORD pointer to IFS driver (DOS 4) or redirector block (DOS 5+) for
this drive, 00000000h if native DOS
56h WORD available for use by IFS driver
Notes: the path for invalid drives is normally set to X:\, but may be empty
after JOIN x: /D in DR DOS 5.0 or NET USE x: /D in older LAN versions
normally, only one of bits 13&12 may be set together with bit 14, but
DR DOS 5.0 uses other combinations for bits 15-12: 0111 JOIN,
0001 SUBST, 0101 ASSIGN (see #1330)
Windows for Workgroups 3.11 network sets 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
SoftWindows on the Macintosh PowerPC sets \\E for the host drive
See Also: #1330,INT 21/AX=71AAh/BL=00h
Format of DR DOS 5.0-6.0 current directory structure entry (array):
Offset Size Description (Table 1330)
00h 67 BYTEs ASCIZ pathname of actual root directory for this logical drive
43h WORD drive attributes
1000h SUBSTed drive
3000h??? JOINed drive
4000h physical drive
5000h ASSIGNed drive
7000h JOINed drive
8000h network drive
45h BYTE physical drive number (0=A:) if this logical drive is valid
46h BYTE ??? apparently flags for JOIN and ASSIGN
47h WORD cluster number of start of parent directory (0000h = root)
49h WORD entry number of current directory in parent directory
4Bh WORD cluster number of start of current directory
4Dh WORD used for media change detection (details not available)
4Fh WORD cluster number of SUBST/JOIN "root" directory
0000h if physical root directory
See Also: #1329
Format of Windows NT Current Directory Structure (CDS) (array):
Offset Size Description (Table 1331)
00h 67 BYTEs ASCIZ path in form X:\ (does not show either current directory
or network path)
43h 4 BYTEs ???
Note: the WinNT CDS contains only as many entries as there are local drives,
not LASTDRIVE entries.
Format of DOS device driver header:
Offset Size Description (Table 1332)
00h DWORD pointer to next driver, offset=FFFFh if last driver
04h WORD device attributes (see #1333,#1334)
06h WORD device strategy entry point
call with ES:BX -> request header
(see #2284 at INT 2F/AX=0802h)
08h WORD device interrupt entry point
---character device---
0Ah 8 BYTEs blank-padded character device name
---block device---
0Ah BYTE number of subunits (drives) supported by driver
0Bh 7 BYTEs normally unused; sometimes contains signature to indicate
specific drivers:
"$PCMATA" PCMCIA driver PCMATA.SYS (see AX=440Dh"DOS 3.2+")
"AHADDVR" Adaptec SCSI disk driver ASPIDISK.SYS
"DBLSPAC" MS DoubleSpace or DriveSpace
"DSKREET" NortonUtils v5+ Diskreet (see INT 2F/AX=FE00h)
"GFS " LapLink III device driver DD.BIN
"SIDExxx" PCMCIA driver ATADRV.EXE (see AX=440Dh"DOS 3.2+")
"STAC-CD" Stacker/Stacker Anywhere (see AX=4404h"Stacker")
---DoubleSpace/DriveSpace---
12h 2 BYTEs signature ",." (2Ch 2Eh)
14h var preloading API entry point
---CD-ROM---
12h WORD reserved, must be 0000h
appears to be another device chain
14h BYTE drive letter, 01h=A:, etc. (must initially be 00h; this byte
is set by MSCDEX when it loads)
15h BYTE number of units
16h 6 BYTEs signature 'MSCDnn' where 'nn' is version (currently '00')
(this field does not exist in most drivers)
See Also: #2238 at INT 25/AX=CDCDh,#2531 at INT 2F/AX=5600h
Bitfields for device attributes (character device):
Bit(s) Description (Table 1333)
15 set (indicates character device)
14 IOCTL supported (see AH=44h)
13 (DOS 3.0+) output until busy supported
12 reserved
11 (DOS 3.0+) OPEN/CLOSE/RemMedia calls supported
10-8 reserved
7 (DOS 5.0+) Generic IOCTL check call supported (driver command 19h)
(see AX=4410h,AX=4411h)
6 (DOS 3.2+) Generic IOCTL call supported (driver command 13h)
(see AX=440Ch,AX=440Dh"DOS 3.2+")
5 reserved
4 device is special (use INT 29 "fast console output")
3 device is CLOCK$ (all reads/writes use transfer record described
below)
2 device is NUL
1 device is standard output
0 device is standard input
Note: for European MS-DOS 4.0, bit 11 also indicates that bits 8-6 contain a
version code (000 = DOS 3.0,3.1; 001 = DOS 3.2;
010 = European DOS 4.0)
See Also: #1334,#1332
Bitfields for device attributes (block device):
Bit(s) Description (Table 1334)
15 clear (indicates block device)
14 IOCTL supported
13 non-IBM format
12 network device (device is remote)
11 (DOS 3.0+) OPEN/CLOSE/RemMedia calls supported
10 reserved
9 direct I/O not allowed??? (set by DOS 3.3 DRIVER.SYS for "new" drives)
8 ??? set by DOS 3.3 DRIVER.SYS for "new" drives
7 (DOS 5.0+) Generic IOCTL check call supported (driver command 19h)
(see AX=4410h,AX=4411h)
6 (DOS 3.2+) Generic IOCTL call supported (driver command 13h)
implies support for commands 17h and 18h
(see AX=440Ch,AX=440Dh"DOS 3.2+",AX=440Eh,AX=440Fh)
5-2 reserved
1 driver supports 32-bit sector addressing (DOS 3.31+)
0 reserved
Note: for European MS-DOS 4.0, bit 11 also indicates that bits 8-6 contain a
version code (000 = DOS 3.0,3.1; 001 = DOS 3.2;
010 = European DOS 4.0)
See Also: #1333,#1332
Format of DOS 2.x disk buffer:
Offset Size Description (Table 1335)
00h DWORD pointer to next disk buffer, offset = FFFFh if last
least-recently used buffer is first in chain
04h BYTE drive (0=A, 1=B, etc), FFh if not in use
05h 3 BYTEs unused??? (seems always to be 00h 00h 01h)
08h WORD logical sector number
0Ah BYTE number of copies to write (1 for non-FAT sectors)
0Bh BYTE sector offset between copies if multiple copies to be written
0Ch DWORD pointer to DOS Drive Parameter Block (see #1083 at AH=32h)
10h buffered data
See Also: #1336,#1338,#1339,#1341
Format of DOS 3.x disk buffer:
Offset Size Description (Table 1336)
00h DWORD pointer to next disk buffer, offset = FFFFh if last
least-recently used buffer is first in chain
04h BYTE drive (0=A,1=B, etc), FFh if not in use
05h BYTE buffer flags (see #1337)
06h WORD logical sector number
08h BYTE number of copies to write (1 for non-FAT sectors)
09h BYTE sector offset between copies if multiple copies to be written
0Ah DWORD pointer to DOS Drive Parameter Block (see #1083 at AH=32h)
0Eh WORD unused??? (almost always 0)
10h buffered data
See Also: #1335,#1338,#1339,#1341
Bitfields for DOS 3.x disk buffer flags:
Bit(s) Description (Table 1337)
7 ???
6 buffer dirty
5 buffer has been referenced
4 ???
3 sector in data area
2 sector in a directory, either root or subdirectory
1 sector in FAT
0 boot sector??? (guess)
See Also: #1342
Format of DOS 4.00 (pre UR 25066) disk buffer info:
Offset Size Description (Table 1338)
00h DWORD pointer to array of disk buffer hash chain heads (see #1340)
04h WORD number of disk buffer hash chains (referred to as NDBCH below)
06h DWORD pointer to lookahead buffer, zero if not present
0Ah WORD number of lookahead sectors, else zero (the y in BUFFERS=x,y)
0Ch BYTE 00h if buffers in EMS (/X), FFh if not
0Dh WORD EMS handle for buffers, zero if not in EMS
0Fh WORD EMS physical page number used for buffers (usually 255)
11h WORD ??? seems always to be 0001h
13h WORD segment of EMS physical page frame
15h WORD ??? seems always to be zero
17h 4 WORDs EMS partial page mapping information???
See Also: #1335,#1336,#1339,#1343
Format of DOS 4.01 (from UR 25066 Corrctive Services Disk on) disk buffer info:
Offset Size Description (Table 1339)
00h DWORD pointer to array of disk buffer hash chain heads (see #1340)
04h WORD number of disk buffer hash chains (referred to as NDBCH below)
06h DWORD pointer to lookahead buffer, zero if not present
0Ah WORD number of lookahead sectors, else zero (the y in BUFFERS=x,y)
0Ch BYTE 01h, possibly to distinguish from pre-UR 25066 format
0Dh WORD ??? EMS segment for BUFFERS (only with /XD)
0Fh WORD ??? EMS physical page number of EMS seg above (only with /XD)
11h WORD ??? EMS segment for ??? (only with /XD)
13h WORD ??? EMS physical page number of above (only with /XD)
15h BYTE ??? number of EMS page frames present (only with /XD)
16h WORD segment of one-sector workspace buffer allocated in main memory
if BUFFERS/XS or /XD options in effect, possibly to avoid DMA
into EMS
18h WORD EMS handle for buffers, zero if not in EMS
1Ah WORD EMS physical page number used for buffers (usually 255)
1Ch WORD ??? appears always to be 0001h
1Eh WORD segment of EMS physical page frame
20h WORD ??? appears always to be zero
22h BYTE 00h if /XS, 01h if /XD, FFh if BUFFERS not in EMS
See Also: #1335,#1336,#1338,#1343
Format of DOS 4.x disk buffer hash chain head (array, one entry per chain):
Offset Size Description (Table 1340)
00h WORD EMS logical page number in which chain is resident, -1 if not
in EMS
02h DWORD pointer to least recently used buffer header. All buffers on
this chain are in the same segment.
06h BYTE number of dirty buffers on this chain
07h BYTE reserved (00h)
Notes: buffered disk sectors are assigned to chain N where N is the sector's
address modulo NDBCH, 0 <= N <= NDBCH-1
each chain resides completely within one EMS page
this structure is in main memory even if buffers are in EMS
Format of DOS 4.0-6.0 disk buffer:
Offset Size Description (Table 1341)
00h WORD forward ptr, offset only, to next least recently used buffer
02h WORD backward pointer, offset only
04h BYTE drive (0=A,1=B, etc) if bit 7 clear
SFT index if bit 7 set
FFh if not in use
05h BYTE buffer flags (see #1342)
06h DWORD logical sector number (local buffers only)
0Ah BYTE number of copies to write
for FAT sectors, same as number of FATs
for data and directory sectors, usually 1
0Bh WORD offset in sectors between copies to write for FAT sectors
0Dh DWORD pointer to DOS Drive Parameter Block (see #1083 at AH=32h)
11h WORD size of data in buffer if remote buffer (see also #1342)
13h BYTE reserved (padding)
14h buffered data
Note: for DOS 4.x, all buffered sectors which have the same hash value
(computed as the sum of high and low words of the logical sector
number divided by the number of disk buffer chains) are on the same
doubly-linked circular chain; for DOS 5+, only a single circular
chain exists.
the links consist of offset addresses only, the segment being the same
for all buffers in the chain.
See Also: #1335,#1336,#1338
Bitfields for DOS 4.0-6.0 disk buffer flags:
Bit(s) Description (Table 1342)
7 remote buffer
6 buffer dirty
.NG limit reached, continued in next section...