Entering new era with DRevitalize 4 | Email: support@drevitalize.com

HDD

Forum

Notifications
Clear all

Detect all connected hard drives under DOS

1 Posts
1 Users
0 Likes
4,151 Views
piotr
(@piotr)
Member Admin
Joined: 4 years ago
Posts: 13
Topic starter  

A small example on how to detect all connected hard drives under 32-bit DOS extender and Legacy ATA. The source code will compile under a recent version of WATCOM C++ (1.9 or higher). These are the steps executed by the code :

  1. INT13h extensions are used to detect all drives visible by the BIOS and starting at 0x80.
  2. If the drive is removable the user is informed and the loop continues until all BIOS drives are checked.
  3. If the drive is a hard drive INT13h extensions are used to detect base ATA port and control ATA port.
  4. ATA identify command is sent to the drive using the detected ATA ports.
  5. Information about drive model, drive serial number and drive firmware revision is displayed.

All code that is linked from forums is under MIT license.

DOS Drives detection


   
Quote
Share: