The MASM Forum Archive 2004 to 2012

General Forums => The Laboratory => Topic started by: Geryon on June 16, 2005, 03:52:02 PM

Title: Reading & Writing IDE Hard Drive Disks
Post by: Geryon on June 16, 2005, 03:52:02 PM
how can i read/write IDE HDDs with "int13" and how can access to them with using DMA ?

int13 ah = 02 does not work !!!! ( i dont know why ? CF = 0 too :( )

Do you know any good links about Hardware interfacing ?
Title: Re: Reading & Writing IDE Hard Drive Disks
Post by: MichaelW on June 16, 2005, 04:40:35 PM
Interrupt 13h will work OK for a FDD or a HDD from a DOS app running under Windows 9x, but only for a FDD under Windows 2000/XP. Why would you want to bypass the OS and write directly to the HDD?
Title: Re: Reading & Writing IDE Hard Drive Disks
Post by: Geryon on June 17, 2005, 08:31:04 AM
:)
Because i will write my own OS :)
But i am still writing boot sector.
I think maybe problem dependent on VMWare ???
Title: Re: Reading & Writing IDE Hard Drive Disks
Post by: roticv on June 17, 2005, 08:59:46 AM
That's weird. It worked for me.  :toothy
Title: Re: Reading & Writing IDE Hard Drive Disks
Post by: xenon on June 19, 2005, 02:36:47 PM
Int 13h, Function 2 should work.

Try AX=0201h
BX=0
CX=1
DX=0080h
ES=1000h

to read the MBR.
512 bytes should appear at 1000:0000 (real mode seg:offset, in hex)

I didn't try this code myself before posting. Sorry if I make a mistake.

For more information,
http://www.phoenix.com/en/Customer+Services/White+Papers-Specs/pc+industry+specifications.htm

Get the Enhanced Disk Drive Specification