Page 1 of 1

[Solved](Protected Mode)How to read disk sectors?

Posted: Thu Aug 23, 2012 9:02 pm
by leyley
I created a 1.44MB floppy image to write a OS for practise(now in boot stages), I set a simple GDT and open A20 line then enter the protected mode(not paging, will set it later). I know that in protected mode I cannot int directly unless there are some IDTs have been set. However, the way to read disk sectors in protected mode is unclear. How can I do it? Is there any way to read a sector from the disk except inturrpets(in protected mode)?
Thanks!

Re: (Protected Mode)How to read disk sectors?

Posted: Thu Aug 23, 2012 9:13 pm
by Brynet-Inc

Re: (Protected Mode)How to read disk sectors?

Posted: Thu Aug 23, 2012 9:21 pm
by leyley
The floppy controller is programmed through 9 registers, which can be accessed through IO ports 0x3F0 through 0x3F7 (excluding 0x3F6)
Thanks!