Floppy reading with sectors, heads and tracks

Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
Post Reply
Thunder

Floppy reading with sectors, heads and tracks

Post by Thunder »

Hello,
I'm confused,first my bootloader read kernel just adding sectors (track has 18 sectors), so I wrote that int 13h must read say 24 kb, it loaded, but after i added code it saw to be not working.

Then I found info that we can read first:
17 sectors (first is bootloader), head 0, track 0, then
18 sectors, head 1, track 0,
18 sectors, head 0, track 1,
18 sectors, head 1, track 1,
and so on...

But it seems that this don't work,
How I need to change tracks and heads to read kernel correctly?

Btw, where LInux and Windows kernels are starting at RAM, what paging they use (4kb or 4bm or mixed) and what multitasking they use (hardware or software)?

Thanks :)
User avatar
Pype.Clicker
Member
Member
Posts: 5964
Joined: Wed Oct 18, 2006 2:31 am
Location: In a galaxy, far, far away
Contact:

Re:Floppy reading with sectors, heads and tracks

Post by Pype.Clicker »

the list of sectors you gave should work fine (though i would rather have started the kernel at head1, track0, sector1 rather than head0, track 0, sector 2 for simpler code -- keeping the rest of first track for stuff like directory (if any), configuration files,etc.
Unexpected

Re:Floppy reading with sectors, heads and tracks

Post by Unexpected »

Thunder's second question isn't in subject..
But can anyone answer?
Where Linux and Windows kernels are starting at RAM, what paging they use (4kb or 4mb or mixed) and what multitasking they use (hardware or software)?
TB

Re:Floppy reading with sectors, heads and tracks

Post by TB »

Hi,
19th sector of the floppy drive has the following params:
- head 1
- track 0
- sector 1

So bassicaly, what you do is:
1. read your 17 sectors (0/0/2 - head/track/sector accordinly)
2. switch head to 1
3. read 18 sectors

Afterwards you'll have to increase "track" and set head to 0, in order to read 37th sector.

Kind Regards,
TB.
Post Reply