fat12 file system

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
xyjamepa

fat12 file system

Post 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...
Cjmovie

Re:fat12 file system

Post by Cjmovie »

xyjamepa

Re:fat12 file system

Post by xyjamepa »

please i need some source codes
xyjamepa

Re:fat12 file system

Post by xyjamepa »

okay guys give me some help here
some source codes whatever...
just help me
Dex4u

Re:fat12 file system

Post 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.
xyjamepa

Re:fat12 file system

Post 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?
User avatar
Pype.Clicker
Member
Member
Posts: 5964
Joined: Wed Oct 18, 2006 2:31 am
Location: In a galaxy, far, far away
Contact:

Re:fat12 file system

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