FAT12 Root Directory Question
Page 1 of 1

Author:  Armature [ Sun Dec 30, 2018 6:09 am ]
Post subject:  FAT12 Root Directory Question

Hi, I've been working on a simple MSDOS style operating system but I'm having issues with the FAT12 File system, specifically the root directory entries. Whenever I add a file such as a PDF file to the disk, the root directory adds the typical 8:3 entry, however, when I add my Kernel.bin file, I notice two entries are added in the root directory. The first entry added is "AK e r n e l". This entry takes up 32 bytes. The second entry is the typical FAT12 entry with the 8:3 file name and the data associated with it. Ive been searching the Internet for days for an answer to this mystery but I can't seem to find anything about it. I even bought the book Modern Operating Systems by tanenbaum yet it doesn't mention this.

My boot code keeps recognising this as the actual kernel entry, so when I check the bytes at 0x0A and 0x0B, the first cluster isn't there and it just jumps into some random location in memory. Can someone explain this to me because its been driving me crazy for ages now.

Thanks for any help you guys can offer.

Author:  Octacone [ Sun Dec 30, 2018 7:40 am ]
Post subject:  Re: FAT12 Root Directory Question

The thing you're talking about is called a long file name entry. It gets automatically created once you add a file to your FATxx medium.
It is useful because it preserves the entire file name, aka your file name can be longer that 8 letters and have both lower and upper case.
For example:
Short file name: HELLOWOR.TXT
Long file name: Hello World Something Something.txt

Author:  Armature [ Sun Dec 30, 2018 7:43 am ]
Post subject:  Re: FAT12 Root Directory Question

Oh right, thanks. It's been bothering me for ages.

Author:  nullplan [ Sun Dec 30, 2018 9:05 am ]
Post subject:  Re: FAT12 Root Directory Question

If your FAT12 code worked correctly, you would notice that these entries are invalid, since they have the volume label and system bits set.

Anyway, if you're interested, search for VFAT.

Page 1 of 1 All times are UTC - 6 hours
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group