tags:

views:

24

answers:

1

I use C- standard with standard lib to write a program to read sectors on harddisk on non-OS

Please tell me more details how can I specify and read all part of sectors on partition of harddisk?

E.g : how can I read all MBR, DBR, FAT, Root and Data part and get all information value?

+1  A: 

Use the extended int 13h routines, which should be supported by BIOS that isn't positively ancient. You start with int 13h, AH = 41h. This should return with the carry clear if the extensions are supported. Assuming that comes back positive, you use ah=48h to get the total number of sectors, ah=42h to read and ah=43h to write.

You can get more details from Ralf Brown's interrupt list, available for download in multitudes of places (though probably not as many as it once was!), or in HTML online.

Jerry Coffin