Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- Ralf Brown's Interrupt List (Part 1,2) - format of dos 4.x disk buffer: http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
Format of DOS 4.x 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:   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
        the links consist of offset addresses only, the segment being the same
          for all buffers in the chain.

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson