can some one help me on understanding FAT12 ?

This is a discussion on can some one help me on understanding FAT12 ? within the Tech Board forums, part of the Community Boards category; hello all , recently we were told to make a simple os, therefore we were again told to go and ...

  1. #1
    بابلی ریکا Masterx's Avatar
    Join Date
    Nov 2007
    Location
    Somewhere nearby,Who Cares?
    Posts
    493

    can some one help me on understanding FAT12 ?

    hello all , recently we were told to make a simple os, therefore we were again told to go and study FAT12 file system . so far so good.
    but the problem is , there is sth that i cant understand , i mean i couldnt figure out the reason why this is like this .
    to be clear, im talking about File allocation table in FAT12 system file.
    as you can see in the picture i provided there are two entries which are reserved !! 0 and 1 .
    well the question is , what are these two entries? and why are they reserved ?
    thats all i want to know now .
    Thank you in advance .
    Attached Images Attached Images  
    Last edited by Masterx; 05-26-2010 at 11:38 AM.
    Highlight Your Codes
    The Boost C++ Libraries (online Reference)

    "...a computer is a stupid machine with the ability to do incredibly smart things, while computer programmers are smart people with the ability to do incredibly stupid things. They are,in short, a perfect match.."
    Bill Bryson


  2. #2
    Guest Sebastiani's Avatar
    Join Date
    Aug 2001
    Location
    Waterloo, Texas
    Posts
    5,699
    Quote Originally Posted by Masterx View Post
    hello all , recently we were told to make a simple os, therefore we were again told to go and study FAT12 file system . so far so good.
    but the problem is , there is sth that i cant understand , i mean i couldnt figure out the reason why this is like this .
    to be clear, im talking about File allocation table in FAT12 system file.
    as you can see in the picture i provided there are two entries which are reserved !! 0 and 1 .
    well the question is , what are these two entries? and why are they reserved ?
    thats all i want to know now .
    Thank you in advance .
    "Reserved" basically just means that you should be careful not to write data there, but needn't worry about what it's for. Usually set aside to allow for future extensibility, or to store data used internally by the OS (and thus meaningless to you).
    Code:
    bool fun(bool value)
    {
        return std::pow(std::exp(1), std::complex<float>(0, 1) 
        * std::complex<float>(std::atan(1)*(1 << (value + 2))))
        .real() > 0;
    }

  3. #3
    Master Apprentice phantomotap's Avatar
    Join Date
    Jan 2008
    Posts
    4,230
    The first sector is reserved for the "Parameter Block".

    The next sectors may be reserved for any reason by the software formatting the disc. You should actually examine the parameters to determine if you can use the second sector. (You need to look at the contents to know where the first "FAT" is stored.)

    Soma

  4. #4
    بابلی ریکا Masterx's Avatar
    Join Date
    Nov 2007
    Location
    Somewhere nearby,Who Cares?
    Posts
    493
    Quote Originally Posted by Sebastiani View Post
    "Reserved" basically just means that you should be careful not to write data there, but needn't worry about what it's for. Usually set aside to allow for future extensibility, or to store data used internally by the OS (and thus meaningless to you).
    thank you very much for you response , but the case here is , to find out what these are for.it seems no body knows about it , i nearly search everywhere i knew to find out what actually resides there , or atleast what they created it for!

    Quote Originally Posted by phantomotap View Post
    The first sector is reserved for the "Parameter Block".

    The next sectors may be reserved for any reason by the software formatting the disc. You should actually examine the parameters to determine if you can use the second sector. (You need to look at the contents to know where the first "FAT" is stored.)

    Soma
    thank you dear soma ,
    i dont know whether i understood you right , but if you meant BPB , by mentioning Parameter Block i think the BPB ( bios parameter block resides in boot sector , which in our case is not true ! we are in FAT table .and boot sector is before this section (bootsector,FAT copies,root directory and data area)

    (your idea about formatting the disk looks interesting , it can be , but i need to make sure what they are for .)
    Last edited by Masterx; 05-26-2010 at 09:26 AM.
    Highlight Your Codes
    The Boost C++ Libraries (online Reference)

    "...a computer is a stupid machine with the ability to do incredibly smart things, while computer programmers are smart people with the ability to do incredibly stupid things. They are,in short, a perfect match.."
    Bill Bryson


  5. #5
    and the hat of wrongness Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    32,494
    OSRC: File Systems
    Several documents there for reading
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.
    I support http://www.ukip.org/ as the first necessary step to a free Europe.

  6. #6
    بابلی ریکا Masterx's Avatar
    Join Date
    Nov 2007
    Location
    Somewhere nearby,Who Cares?
    Posts
    493
    Quote Originally Posted by Salem View Post
    OSRC: File Systems
    Several documents there for reading
    thank you verymuch for that .
    i have another question ( might be silly but here it is )
    why do we load bootloader at address "0x7C00" ? why cant we load it some where else?
    edited :
    found the answer to my second question :
    We do not load it to 0x7c00, the BIOS does. There is no specific reason why 0x7c00, it has became a standard loading address for most, if not all, BIOS software.
    Last edited by Masterx; 05-26-2010 at 10:57 AM.
    Highlight Your Codes
    The Boost C++ Libraries (online Reference)

    "...a computer is a stupid machine with the ability to do incredibly smart things, while computer programmers are smart people with the ability to do incredibly stupid things. They are,in short, a perfect match.."
    Bill Bryson


  7. #7
    بابلی ریکا Masterx's Avatar
    Join Date
    Nov 2007
    Location
    Somewhere nearby,Who Cares?
    Posts
    493
    i have finally discovered what those two were reserved for .
    A DOS 1.X boot sector didn't use to provide any details about the disk, there were only 2 types of disks supported so it wasn't a problem. To identify which disk type it was the first two entries in the FAT were used, this has stuck and has become known as the FAT signature.
    source : FOXy2K: FAT System Guide
    Thanks a billion Salem , i found a vague article on FAT with the help of the link you provided, ( i found media descriptor or FAT ID and then searched that and hooray i made it )
    Highlight Your Codes
    The Boost C++ Libraries (online Reference)

    "...a computer is a stupid machine with the ability to do incredibly smart things, while computer programmers are smart people with the ability to do incredibly stupid things. They are,in short, a perfect match.."
    Bill Bryson


Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Understanding forward declarations of classes, pimpl
    By Boxknife in forum C++ Programming
    Replies: 2
    Last Post: 04-22-2010, 01:29 AM
  2. Need help understanding a problem
    By dnguyen1022 in forum C++ Programming
    Replies: 2
    Last Post: 04-29-2009, 04:21 PM
  3. Understanding Headers
    By AeonMoth in forum C++ Programming
    Replies: 2
    Last Post: 06-27-2007, 05:53 AM
  4. trouble understanding the source file structure
    By Mario F. in forum C++ Programming
    Replies: 5
    Last Post: 05-26-2006, 06:46 PM
  5. understanding recursive functions
    By houler in forum C Programming
    Replies: 7
    Last Post: 12-09-2004, 11:56 AM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21