Page 1 of 1

fat12 file system

Posted: Fri Feb 03, 2006 9:07 pm
by xyjamepa
hi every body....
i have just finished my small kernel with commands such as:
help,version,reboot....
so now i want to start writing the file system and i want it to be fat12 so can any one tell me a little about it and give me some source code for commands such as dir...
and i'll be so greatfull...

Re:fat12 file system

Posted: Fri Feb 03, 2006 11:17 pm
by Cjmovie

Re:fat12 file system

Posted: Sat Feb 04, 2006 11:39 am
by xyjamepa
please i need some source codes

Re:fat12 file system

Posted: Sat Feb 04, 2006 11:52 am
by xyjamepa
okay guys give me some help here
some source codes whatever...
just help me

Re:fat12 file system

Posted: Sat Feb 04, 2006 12:19 pm
by Dex4u
Ok theres some code written for people like you, that includes the "dir" commend etc.
Its available here: http://alexfru.chat.ru/epm.html#los4d
In the "OS Development for Dummies" part and you need to get "OS Loader" along with the source code.

Re:fat12 file system

Posted: Sat Feb 04, 2006 4:47 pm
by xyjamepa
okay now i want to make a command to creat a new text file
or a new directory
please can you help me with this?

Re:fat12 file system

Posted: Sun Feb 05, 2006 3:36 am
by Pype.Clicker
may i suggest you google for "FAT12 driver sources" ? plenty of open-source projects such as MenuetOS or FreeDos should have these.

That should look like:

Code: Select all

   ede = locate_empty_directory_entry();
   write_directory_entry(ede, filename, etc)
   firstcluster = locate_free_cluster_in_FAT();
   set_cluster(ede, firstcluster);
   while (still some data to write) do {
      write_to(current_cluster);
      next_cluster = locate_free_cluster_in_FAT();
      FAT_chain(current_cluster, next_cluster);
      current_cluster = next_cluster;
   }
   update_file_size(ede);