I am writing an OS using the Netwide Assembler, not Microsoft's; I know that violates the license. What I'm look for is the simplest conventional way to read from and write to an HDD (in p-mode, so no BIOS ints). Simple documentation links, explanations, and asm code snippets are what I find to be the most helpful. Help appreciated,
Brodeur235
The ATA/ATAPI standards should be useful. You used to be able to get the working drafts for free from the committee responsible for the standards:
http://www.t13.org/Default.aspx
But they are apparently no longer available, so you're probably left with buying the published standards. Try the Global Engineering Documents link on the t13 Published Standards page. The download price seems to be in the vicinity of $30.
PIO mode through the command/control block registers used to be easy to do, at least for the purposes of identifying the drive.
You have 2 options. One is to switch to real mode, do the bios int 13 call then switch back to pmode, but that is very slow.
The other is to write a driver, the ports and commands are well documented.
You might want to look at osdev.org or the OS construction forum at board.flatassembler.net
I have the atapi6 pdf somewhere, I can upload it here when I dig it out if anyone wants.
Take a look
http://www.pjrc.com/tech/8051/ide/wesley.html