Page 1 of 1

Fat12 filesystem

Posted: Fri Jun 03, 2005 11:00 pm
by SG
In wich way can i create a file using nasm from my os. The os is on a floppy, so the filesystem is fat12.
I know the fat12 specs, but i don't know how to start.
Please i need help, expecially code.
Otherwise, please explain me how to do that.

Re: Fat12 filesystem

Posted: Sun Jun 05, 2005 11:00 pm
by DRF
Could you be more descriptive?

Just because you are using a floppy disk doesn't mean you have to use a FAT12 filesystem. I would recommend implementing the FAT12 system but this isn't the only choice.
It's unclear from your post if you want to make a file to be loaded by your kernel from a FAT12 filesystem or if you want to write code to implment a filesystem. (I'll assume the latter)

To implement a FAT filesystem the first stage is adding to the bootloader code a small table of information which identifies the makeup of the filesystem on the disk. This allows drivers (both your own and other OS's) to read the start of the floppy disk and determine where to look for the FAT table itself etc. (if your using grub not sure if this is included as an option or how that works only done this on my own bootloaders).

Then you can write the drivers themselves. I'm at work currently so can't think of/find any examples here unfortunatly.

Daniel

Re: Fat12 filesystem

Posted: Sun Jun 05, 2005 11:00 pm
by SG
1)I don't use grub.
2)i want to implement the filesystem in my os.
3)The first thing: for example, in wich way could i create a text file on the disk?