Hi,
I'm trying to develop an IDE/ATA Driver for my OS and I need write and read byte/word in the harddisk (very easy. I don't need access to the FAT, I only need write a byte and read that byte).
The question is how to rw in pmode? any simple example? I cant use ints 13h, etc.
I read this thread and I tested the asm code: http://forum.osdev.org/viewtopic.php?t=12268 but it uses int13h, int 20h, etc.
Im using nasm / ansi c / bochs
(standard intel instructions)
PD: I also read that I could switch to real mode, but its very slow.
How to rw harddisk in pmode?
Re: How to rw harddisk in pmode?
Do you mean you only need to read and write a single byte/word ? Or are you trying to write a complete driver ?raz0r wrote:Hi,
I'm trying to develop an IDE/ATA Driver for my OS and I need write and read byte/word in the harddisk (very easy. I don't need access to the FAT, I only need write a byte and read that byte).
The question is how to rw in pmode? any simple example? I cant use ints 13h, etc.
I read this thread and I tested the asm code: http://forum.osdev.org/viewtopic.php?t=12268 but it uses int13h, int 20h, etc.
Im using nasm / ansi c / bochs
(standard intel instructions)
PD: I also read that I could switch to real mode, but its very slow.
If a trainstation is where trains stop, what is a workstation ?
Re: How to rw harddisk in pmode?
Gerry, I need only read/write byte/word. Im trying to develop very simple driver with that only 2 functions.
Tyler, I read that page but the ATA Driver Example dont works in bochs (read the "Comments" at the end of the page)
Tyler, I read that page but the ATA Driver Example dont works in bochs (read the "Comments" at the end of the page)
Re: How to rw harddisk in pmode?
yep, rw a simple block... (I think that ill complete with 0).berkus wrote:Disk drive is a block device, you cannot read/write single bytes.raz0r wrote:Gerry, I need only read/write byte/word. Im trying to develop very simple driver with that only 2 functions.
do you know any simple method for do this in pmode?
...or how can i switch to realmode for execute int 13h...