[<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
Format of DOS 2.x disk buffer:
Offset  Size    Description
 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 AH=32h)
 10h            buffered data

Format of DOS 3.x disk buffer:
Offset  Size    Description
 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    flags
                bit 7: ???
                bit 6: buffer dirty
                bit 5: buffer has been referenced
                bit 4: ???
                bit 3: sector in data area
                bit 2: sector in a directory, either root or subdirectory
                bit 1: sector in FAT
                bit 0: boot sector??? (guess)
 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 AH=32h)
 0Eh    WORD    unused??? (almost always 0)
 10h            buffered data

Format of DOS 4.00 (pre UR 25066) disk buffer info:
Offset  Size    Description
 00h    DWORD   pointer to array of disk buffer hash chain heads (see below)
 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???

Format of DOS 4.01 (from UR 25066 Corrctive Services Disk on) disk buffer info:
Offset  Size    Description
 00h    DWORD   pointer to array of disk buffer hash chain heads (see below)
 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

Format of DOS 4.x disk buffer hash chain head (array, one entry per chain):
Offset  Size    Description
 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-5.0 disk buffer:
Offset  Size    Description
 00h    WORD    forward ptr, offset only, to next least recently used buffer
 02h    WORD    backward ptr, offset only
 04h    BYTE    drive (0=A,1=B, etc), FFh if not in use
 05h    BYTE    flags
                bit 7: remote buffer
                bit 6: buffer dirty
                bit 5: buffer has been referenced
                bit 4: search data buffer (only valid if remote buffer)
                bit 3: sector in data area
                bit 2: sector in a directory, either root or subdirectory
                bit 1: sector in FAT
                bit 0: reserved
 06h    DWORD   logical sector number
 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 AH=32h)
 11h    WORD    buffer use count if remote buffer (see flags above)
 13h    BYTE    reserved
 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 NDBCH) are on the same doubly-linked circular
          chain; for DOS 5.0, only a single circular chain exists.
        the links consist of offset addresses only, the segment being the same
          for all buffers in the chain.

Format of DOS 5.0 disk buffer info:
Offset  Size    Description
 00h    DWORD   pointer to least-recently-used buffer header (may be in HMA)
                (see above)
 04h    WORD    0000h (DOS 5 does not hash disk buffers, so offset 00h points
                        directly at the only buffer chain)
 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    buffer location
                00h base memory, no workspace buffer
                01h HMA, workspace buffer in base memory
 0Dh    DWORD   pointer to one-segment workspace buffer in base memory
 11h  3 BYTEs   unused???
 14h    WORD    ???
 16h    BYTE    ??? apparently always 00h
 17h    BYTE    ??? apparently always FFh
 18h    BYTE    ??? apparently always 00h
 19h    BYTE    ??? apparently always 00h
 1Ah    WORD    ??? segment within HIMEM.SYS area when buffers are in HMA and
                  UMBs are enabled???, else 0000h
 1Ch    BYTE    bit 0 set iff UMB MCB chain linked to normal MCB chain
 1Dh    WORD    ???
 1Fh    WORD    segment of first MCB in upper memory blocks or FFFFh if DOS
                memory chain in base 640K only (first UMB MCB usually at 9FFFh,
                locking out video memory with a DOS-owned memory block)
 21h    WORD    paragraph of start of most recent MCB chain search

This page created by ng2html v1.05, the Norton guide to HTML conversion utility. Written by Dave Pearson