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!
[Solved](Protected Mode)How to read disk sectors?
[Solved](Protected Mode)How to read disk sectors?
Last edited by leyley on Thu Aug 23, 2012 9:21 pm, edited 1 time in total.
Code: Select all
#rm -rf /
- Brynet-Inc
- Member
- Posts: 2426
- Joined: Tue Oct 17, 2006 9:29 pm
- Libera.chat IRC: brynet
- Location: Canada
- Contact:
Re: (Protected Mode)How to read disk sectors?
Thanks!The floppy controller is programmed through 9 registers, which can be accessed through IO ports 0x3F0 through 0x3F7 (excluding 0x3F6)
Code: Select all
#rm -rf /