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.

118 lines
4.0 KiB

4 years ago
  1. ;
  2. ; BDS is the Bios Data Structure.
  3. ;
  4. ; There is one BDS for each logical drive in the system. All the BDS's
  5. ; are linked together in a list with the pointer to the first BDS being
  6. ; found in Start_BDS. The BDS hold various values important to the disk
  7. ; drive. For example there is a field for last time accesses. As actions
  8. ; take place in the system the BDS are update to reflect the actions.
  9. ; For example is there is a read to a disk the last access field for the
  10. ; BDS for that drive is update to the current time.
  11. ;
  12. ; Values for various flags in BDS.Flags.
  13. ;
  14. fNon_Removable equ 01H ;For non-removable media
  15. fChangeline equ 02H ;If changeline supported on drive
  16. RETURN_FAKE_BPB equ 04H ; When set, don't do a build BPB
  17. ; just return the fake one
  18. GOOD_TRACKLAYOUT equ 08H ; The track layout has no funny sectors
  19. fI_Am_Mult equ 10H ;If more than one logical for this physical
  20. fI_Own_Physical equ 20H ;Signify logical owner of this physical
  21. fChanged equ 40H ;Indicates media changed
  22. SET_DASD_true equ 80H ; Set DASD before next format
  23. fChanged_by_format equ 100h
  24. ;
  25. ; Various form factors to describe media
  26. ;
  27. ff48tpi equ 0
  28. ff96tpi equ 1
  29. ffSmall equ 2
  30. ffHardFile equ 5
  31. ffOther equ 7
  32. BDS_Type struc
  33. Link DD ? ; Link to next BDS
  34. DriveNum DB ? ; Physical drive number
  35. DriveLet DB ? ; DOS drive number
  36. BytePerSec DW ? ; number of bytes/sec
  37. SecPerClus DB ? ; sec per allocation unit
  38. RESSEC DW ? ; number of reserved sectors
  39. cFAT DB ? ; number of fats
  40. cDir DW ? ; number of directory entries
  41. DRVLIM DW ? ; number of sectors on medium
  42. mediad DB ? ; media descriptor byte
  43. cSecFat DW ? ; number of sectors/fat
  44. SECLIM DW ? ; sectors per track
  45. HDLIM DW ? ; max number of heads
  46. HIDSEC DW ? ; number of hidden sectors
  47. FatSiz DB ? ; flags...
  48. Opcnt DW ? ; Open ref. count
  49. Volid DB 12 dup (?) ; volume ID of medium
  50. FormFactor DB ? ; form factor index
  51. Flags DW ? ; various flags
  52. cCyln DW ? ; max number of cylinders
  53. RBytePerSec DW ? ; Recommended BPB
  54. RSecPerClus DB ?
  55. RRESSEC DW ?
  56. RcFAT DB ?
  57. RcDir DW ?
  58. RDRVLIM DW ?
  59. Rmediad DB ?
  60. RcSecFat DW ?
  61. RSECLIM DW ?
  62. RHDLIM DW ?
  63. RHIDSEC DW ?
  64. RHHIDSEC DW ?
  65. RLOGSEC DD ?
  66. Reserve DB 6 dup (?) ; Reserved for future
  67. ; changed to word -- kcd9:85
  68. Track DB ? ; last track accessed on drive
  69. Tim_Lo DW ? ; Time of last access. Keep
  70. Tim_Hi DW ? ; these contiguous.
  71. BDS_Type ends
  72. BPBSize = Track - RBytePerSec ; size in bytes of RecBPB area in the BDS
  73. ;;Rev 3.30 Modification
  74. ;*********************************************************************
  75. ; BDS structure for mini disk
  76. ;*********************************************************************
  77. BDSM_type struc
  78. mlink DW -1 ;Link to next structure
  79. DW ?
  80. mdriveNum DB 80 ;Int 13 Drive Number
  81. mdriveLet DB 3 ;Logical Drive Number
  82. mBytePerSec DW 512
  83. mSecPerClus DB 1 ;Sectors/allocation unit
  84. mRESSEC DW 1 ;Reserved sectors for DOS
  85. mcFAT DB 2 ;No. of allocation tables
  86. mcDIR DW 16 ;Number of directory entries
  87. mDRVLIM DW 0 ;Number of sectors (at 512 bytes each)
  88. mMediad DB 11111000B ;Media descriptor
  89. mcSecFat DW 1 ;Number of FAT sectors
  90. mSECLIM DW 0 ;Sector limit
  91. mHDLIM DW 0 ;Head limit
  92. mHIDSEC DW 0 ;Hidden sector count
  93. mFatSiz DB 0 ;TRUE => bigfat
  94. mOPCNT DW 0 ;Open Ref. Count
  95. mVOLID DB "NO NAME " ;Volume ID for this disk
  96. DB 0 ;ASCIZII for "NO NAME "
  97. mFormFactor DB 3 ;Form Factor
  98. mFLAGS DW 0020H ;Various Flags
  99. mcCyln dw 40 ;max number of cylinders
  100. mRecBPB db 31 dup (0) ;Recommended BPB for drive
  101. mTrack db -1
  102. IsMini dw 1 ;Overlapping TIM_LOH
  103. Hidden_Trks dw 0 ;Overlapping TIM_HIH
  104. ;TIM_LOH DW -1 ;Keep these two contiguous (?)
  105. ;TIM_HIH DW -1
  106. BDSM_type ENDS
  107. ;******************************************************************************
  108. Max_mini_dsk_num = 23 ; Max # of mini disk bios can support
  109. ;;End of Modification