Ralf.Brown@B.GP.CS.CMU.EDU (06/18/88)
In article <39500014@pyr1.cs.ucl.ac.uk>, awylie@pyr1.cs.ucl.ac.uk writes: }can someone out there tell me how to find the beginning of the DOS device }driver chain? I have been looking in memory and can see the external drivers I tried to reply to an earlier posting of yours, but my mail got bounced with an "Authorization failure"! Thus this posting. In all known versions of DOS 2.x and 3.x, NUL is the first device in the device driver chain. You can find the location of NUL with the following call, which will also net you the address of the first memory control block: INT 21 - DOS Internal - GET DISK LIST AH = 52h Return: ES:BX points to DOS list of lists List of Lists: Bytes Value -2&-1 Segment of first memory control block 0-3 Pointer to first DOS disk block (see func 36h) 4-7 ??? Partially Unknown. Pointer to a device driver. Maybe first resident driver? 8-B Pointer to CLOCK$ device driver, whether installable or resident C-F Pointer to actual CON: device driver, whether installable or resident -----DOS 2.x 10 Number of logical drives in system 11-12 Maximum bytes/block of any block device 13-16 ??? 17 Beginning (not a pointer. The real beginning!) of NUL device driver. This is the first device on DOS's linked list of device drivers. -----DOS 3.x 10-11 Maximum bytes/block of any block device (0200h) 12-15 ??? Pointer to current directory block? 16-19 Partially Undefined: Pointer to array of drive info: 51h bytes per drive, starting with A: ... 00-3F Current path as ASCIZ, starting with 'x:\' 40-43 ??? I see zeros always 44 ??? Flags? I see 40h, except for entry after last valid entry = 00h 45-48 Pointer to DOS Disk Block for this drive 49-4A ??? Current track or block? -1 if never accessed. 4B-4E ??? I see -1 always 4F-52 ??? I see 2 always 1A-1D ??? Pointer to data area, maybe including cluster allocation table? 1E-1F ??? I see zero always 20 Number of block devices. 21 Value of LASTDRIVE command in CONFIG.SYS (default 5) 22 Beginning (not a pointer. The real beginning!) of NUL device driver. This is the first device on DOS's linked list of device drivers. -- UUCP: {ucbvax,harvard}!cs.cmu.edu!ralf -=-=-=- Voice: (412) 268-3053 (school) ARPA: ralf@cs.cmu.edu BIT: ralf%cs.cmu.edu@CMUCCVMA FIDO: Ralf Brown 1:129/31 Disclaimer? I | claimed something?| Insert your favorite quote here