Page 1 of 1
whats the difference between 0xFF8 - 0xFFF in FAT12
Posted: Fri Jun 25, 2010 6:36 am
by Master
hello all , as you see in FAT12 , it says 0xFF8 - 0xFFF are used to indicate the Last cluster in file, my question is ,
why do we have this range for specifying the end of file!!?
and why cant we use those last addresses for our clusters ?
we could easily use 0xFFF as the indicator (or vice versa), then having this said ,the 0xff8 is in vein and thus completely useless !
i would be very thankful if anyone help me get this ,
thank you in advance
Re: whats the difference between 0xFF8 - 0xFFF in FAT12
Posted: Fri Jun 25, 2010 10:36 am
by Master
could it be that because 0xFF8-0xFFF equals 4088-4095 which exceeds the number of actual clusters usable in Fat12 structure ?
i mean because starting from 0xFF8 means the cluster you are looking for doesn't exist , ( or you have passed the boundary which specifies the last usable cluster in FAT12)
(cluster counts is 4078(0xfee) under windows, and 4084(0xff4) under linux)
we have 0x000 to 0xFFF as the range for our addresses ,and according to below:
FAT12-------------Description
0x000-------------Free Cluster
0x001-------------Reserved value; do not use
*0x002–0xFEF----- Used cluster;value points to next cluster(so this means usable clusters are up to 4078, the rest are for other purposes as you see below)
0xFF0–0xFF6-------Reserved values; do not use
0xFF7---------------Bad sector in cluster or reserved cluster
0xFF8–0xFFF--------Last cluster in file(and what remains is used to specify the end of file , actually it is used to say that you have passed the last usable cluster )
*: this actually says for addressing our clusters we have 0x002 up to 0xFEE choices.
starting from FF0 , we address special cases , up till FF8,
From FF8 to the very end of usable addressing range which is FFF , we use the values to say what you are looking for does not exist , or there are only <FEF number of clusters you could use, now the number you specified is not in that range ,so we use it to say you reached your end of file.
am i right?
Re: whats the difference between 0xFF8 - 0xFFF in FAT12
Posted: Mon Jun 28, 2010 9:13 pm
by Mike
Hello,
The FAT specification says that different disk utilities can use different EOC (End Of Clusterchain. ie, end-of-file) markers. While Microsoft uses 0x0fff for FAT12, it can be different. Because the BAD_CLUSTER marker is at 0x0ff7 for FAT12, its recommended to test between 0x0ff8 and 0x0fff as the EOC marker can be any of those values. (Although you might be safe just testing with 0x0fff.)
Re: whats the difference between 0xFF8 - 0xFFF in FAT12
Posted: Sat Jul 10, 2010 7:15 pm
by Master
Mike wrote:Hello,
The FAT specification says that different disk utilities can use different EOC (End Of Clusterchain. ie, end-of-file) markers. While Microsoft uses 0x0fff for FAT12, it can be different. Because the BAD_CLUSTER marker is at 0x0ff7 for FAT12, its recommended to test between 0x0ff8 and 0x0fff as the EOC marker can be any of those values. (Although you might be safe just testing with 0x0fff.)
thank you very much

Re: whats the difference between 0xFF8 - 0xFFF in FAT12
Posted: Sun Nov 21, 2010 7:14 pm
by Hoozim
It all has to do with horrible planning in the past. Its like having the A20 gate in the keyboard controller.