Page 1 of 1

Reading FAT

Posted: Tue Feb 04, 2003 12:25 pm
by srg
Hi

I have come to the part on my second stage loader when I need to load my Kernel into RAM for execution, at the mo from a floppy (FAT12).

Do I need to copy the whole RootDir and FAT of the Disk into memory and then "Walk the FAT" from there in order to find and load my Kernel Image File?

Thanks

Re:Reading FAT

Posted: Tue Feb 04, 2003 3:54 pm
by chrisa128
Yes, thats wat you need to do...

I just hope that you havn't loaded PMode in your second stage loader...

Re:Reading FAT

Posted: Wed Feb 05, 2003 1:06 am
by distantvoices
As far as I have seen, you need to load the root directory into memory and afterwards walk throu it: each 11 bytes are for an entry in the directory,so you can compare a string with it.

I myself have to learn how to accomplish this in practice. so far I only use a direct bootloade which pics the sectors directly and puts data into memory. I didn't bother about fat12 at the moment i decided to handle it that way.

Re:Reading FAT

Posted: Wed Feb 05, 2003 1:30 am
by srg
chrisa128 wrote: Yes, thats wat you need to do...

I just hope that you havn't loaded PMode in your second stage loader...
Pmode loaded.......I am not frightened to program the Floppy Drive or Hard Disk myself