DOS 3.30 source code leak
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.

61 lines
1.8 KiB

5 years ago
  1. ; SCCSID = @(#)buffer.asm 1.1 85/04/09
  2. BREAK <Disk I/O Buffer Header>
  3. ;----+----+----+----+----+----+----+----+----+----+----+----+----+----+----;
  4. ; C A V E A T P R O G R A M M E R ;
  5. ; ;
  6. ; Field definition for I/O buffer information
  7. BUFFINFO STRUC
  8. buf_link DD ? ; Pointer to next buffer in list
  9. buf_ID DB ? ; Drive of buffer (bit 7 = 0)
  10. ; SFT table index (bit 7 = 1)
  11. ; = FFH if buffer free
  12. buf_flags DB ? ; Bit 7 = 1 if Remote file buffer
  13. ; = 0 if Local device buffer
  14. ; Bit 6 = 1 if buffer dirty
  15. ; Bit 5 = Reserved
  16. ; Bit 4 = Search bit (bit 7 = 1)
  17. ; Bit 3 = 1 if buffer is DATA
  18. ; Bit 2 = 1 if buffer is DIR
  19. ; Bit 1 = 1 if buffer is FAT
  20. ; Bit 0 = Reserved
  21. buf_sector DW ? ; Sector number of buffer (bit 7 = 0)
  22. ; The next two items are often refed as a word (bit 7 = 0)
  23. buf_wrtcnt DB ? ; For FAT sectors, # times sector written out
  24. buf_wrtcntinc DB ? ; " " " , # sectors between each write
  25. buf_DPB DD ? ; Pointer to drive parameters
  26. buf_fill DW ? ; How full buffer is (bit 7 = 1)
  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. ; C A V E A T P R O G R A M M E R ;
  52. ;----+----+----+----+----+----+----+----+----+----+----+----+----+----+----;