Sponsoring website: Emergency Boot Kit

An Example of How to Directly Access a Hard Drive
with Input/Output Ports using a DEBUG Script File

Copyright©2001, 2007 by Daniel B. Sedory

 

Here's what the data looks like from a 30 GB hard drive after running my DEBUG script file at a REAL (16-bit) DOS prompt (not in a DOS box!): DevID30gb.txt .  NOTE: Words 60 - 61 ( Hex offsets 178h to 17Bh) of the data returned by a drive in reply to the ATA “IDENTIFY DEVICE” command, show the Total Number of Useable Sectors for the drive. It's 58,633,344 sectors for this particular 30 GB drive. This is the only number the user needs to be concerned about when trying to determine the size of a drive over  8.4 GB.

Instructions: Download DEVIDP0.ZIP and extract the files to a folder you can easily access for copying them to a floppy diskette and for further study. Once you've created a 16-bit DOS bootable floppy diskette with a copy of MS-DEBUG (DEBUG.EXE) on it as well (or accessible by a PATH statement), copy the files GETATAID.BAT and DEVIDP0.DSF to the diskette, boot up a computer with the diskette, then ENTER the batch file name, GETATAID, at the DOS prompt:

A:\>getataid

This will run the batch file, GETATAID.BAT, which pipes our Debug script file (DEVIDP0.DSF) into DEBUG and sends the output to a file called P0TMP.TXT.

Here's a copy of the script file (DEVIDP0.DSF) with a .txt file extension so you can view it now: DEVIDP0.DSF.txt .


If you want an executable program which provides more information (based on ATA-5 commands) about all the drives on your system, then go to the bottom of this page: http://www.partitionsupport.com/utilities.htm and download Svend Mikkelsen's "Identify" program. It must also be run from a real (16-bit) DOS prompt.


Updated: October 13, 2007.

 

Back to: DEBUG.htm