Source code of Windows XP (NT5)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

76 lines
2.2 KiB

  1. BREAK <Disk I/O Buffer Header>
  2. ;** BUFFER.INC
  3. ;
  4. ; Field definition for I/O buffer information
  5. BUFFINFO STRUC
  6. buf_next DW ? ; Pointer to next buffer in list
  7. buf_prev DW ? ; Pointer to prev buffer in list
  8. buf_ID DB ? ; Drive of buffer (bit 7 = 0)
  9. ; SFT table index (bit 7 = 1)
  10. ; = FFH if buffer free
  11. buf_flags DB ? ; Bit 7 = 1 if Remote file buffer
  12. ; = 0 if Local device buffer
  13. ; Bit 6 = 1 if buffer dirty
  14. ; Bit 5 = Reserved
  15. ; Bit 4 = Search bit (bit 7 = 1)
  16. ; Bit 3 = 1 if buffer is DATA
  17. ; Bit 2 = 1 if buffer is DIR
  18. ; Bit 1 = 1 if buffer is FAT
  19. ; Bit 0 = Reserved
  20. buf_sector DD ? ; Sector number of buffer (bit 7 = 0)
  21. ; The next two items are often refed as a word (bit 7 = 0)
  22. buf_wrtcnt DB ? ; For FAT sectors, # times sector written out
  23. buf_wrtcntinc DW ? ; " " " , # sectors between each write
  24. buf_DPB DD ? ; Pointer to drive parameters
  25. buf_fill DW ? ; How full buffer is (bit 7 = 1)
  26. buf_reserved DB ? ; make DWORD boundary for 386
  27. BUFFINFO ENDS
  28. buf_offset EQU DWORD PTR buf_sector
  29. ;For bit 7 = 1, this is the byte
  30. ;offset of the start of the buffer in
  31. ;the file pointed to by buf_ID. Thus
  32. ;the buffer starts at location
  33. ;buf_offset in the file and contains
  34. ;buf_fill bytes.
  35. BUFINSIZ EQU SIZE BUFFINFO
  36. ; Size of structure in bytes
  37. buf_Free EQU 0FFh ; buf_id of free buffer
  38. ;Flag byte masks
  39. buf_isnet EQU 10000000B
  40. buf_dirty EQU 01000000B
  41. ;***
  42. buf_visit EQU 00100000B
  43. ;***
  44. buf_snbuf EQU 00010000B
  45. buf_isDATA EQU 00001000B
  46. buf_isDIR EQU 00000100B
  47. buf_isFAT EQU 00000010B
  48. buf_type_0 EQU 11110001B ; AND sets type to "none"
  49. buf_NetID EQU BUFINSIZ
  50. ;
  51. ; Buffer Hash Entry Structure
  52. ;
  53. ;BUFFER_HASH_ENTRY STRUC ; DOS 4.00
  54. ;EMS_PAGE_NUM DW -1 ; logical page number for EMS handle
  55. ;BUFFER_BUCKET DD ? ; pointer to buffers
  56. ;DIRTY_COUNT DB 0 ; number of dirty buffers
  57. ;BUFFER_RESERVED DB 0 ; reserved
  58. ;BUFFER_HASH_ENTRY ENDS
  59. ;
  60. ;MaxBuffinBucket EQU 15 ; Max number of buffers per bucket
  61. ;MaxBucketinPage EQU 2 ; Max number of buckets per 16kb page
  62. ;
  63. ;
  64. ; ;
  65. ; C A V E A T P R O G R A M M E R ;
  66. ;----+----+----+----+----+----+----+----+----+----+----+----+----+----+----;