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

HDD

Forum

Notifications
Clear all

Detect all connected hard drives under DOS in AHCI mode

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

A small example on how to detect all connected hard drives under 32-bit DOS extender and AHCI. 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. BIOS functions from interrupt 0x1A are used to call PCI routines
  2. Full AHCI engine in 32-bit protected mode.
  3. Ability to detect hard drives on any AHCI port.
  4. ATA identify command is sent to each drive connected via AHCI link
  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 AHCI


   
Quote
Share: