Reading FAT

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
srg

Reading FAT

Post 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
chrisa128

Re:Reading FAT

Post by chrisa128 »

Yes, thats wat you need to do...

I just hope that you havn't loaded PMode in your second stage loader...
distantvoices
Member
Member
Posts: 1600
Joined: Wed Oct 18, 2006 11:59 am
Location: Vienna/Austria
Contact:

Re:Reading FAT

Post 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.
... the osdever formerly known as beyond infinity ...
BlueillusionOS iso image
srg

Re:Reading FAT

Post 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
Post Reply