andrews@hpcupt1.UUCP (07/01/88)
How can I determine whether the FAT is using 12-bits or 16-bits per entry? Is there a DOS call that specifically states: 12(16)-bit FAT, or does it need to be infered (e.g. via DOS version [>3.2] or disk size [>32M])?
dixon@zephyrus.steinmetz (Walter V. Dixon) (07/02/88)
The number of clusters in the "Data Area" of the disk (ie the part of the disk mapped by thFAT)T determines whether 16 or 12 bit FATs are required. If there are less than 0xff8 clusters, 12 bit FATs are used; otherwise 16 bit FATs are used. I hope this helps.
john@viper.Lynx.MN.Org (John Stanley) (07/03/88)
In article <5930009@hpcupt1.HP.COM> andrews@hpcupt1.HP.COM (Edward E. Andrews) writes: >How can I determine whether the FAT is using 12-bits or 16-bits per entry? >Is there a DOS call that specifically states: 12(16)-bit FAT, or does it >need to be infered (e.g. via DOS version [>3.2] or disk size [>32M])? There are several ways to determine this. The easiest way is to check the number of clusters on the disk. If it's less than 4096 it's -probably- using 12 bit FAT entrys. This isn't a sure thing, but it will work 99% of the time... If you plan on doing much more at this level I'd recommend you go out and buy two books: Advanced MS-DOS Microsoft-Press Ray Duncan $22.95 Programmers Guide to the IBM PC Microsoft-Press Peter Norton $19.95 Both are excelent for the beginner as well as being good solid reference manuals that I use regularly. The two books complement each other. If something isn't clear in one the other generaly covers it well and vica-verca... --- John Stanley (john@viper.UUCP) Software Consultant - DynaSoft Systems UUCP: ...{amdahl,ihnp4,rutgers}!meccts!viper!john
bobmon@iuvax.cs.indiana.edu (RAMontante) (07/04/88)
I think you should infer the size of the FAT entry. I have a 30Meg RLL drive, currently split into four partitions. MSDOSv3.21 chose a 16-bit FAT for the 25Meg (i.e., larger than the 20Meg "standard" limit) partition, and 12-bit FATs for the other three partitions. Norton's Programmer's Guide elaborates: "If a disk format has more clusters than [4080], then we need the 16-bit FAT....Our programs can learn the format of a disk by reading and inspecting the FAT ID byte [the first bite of the FAT]. However, the official way of finding out the format is to use DOS function 27 (hex 1B)." His description of this function indicates that it will report the number of clusters, but not the FAT size itself. -- bob,mon (bobmon@iuvax.cs.indiana.edu) "In this position, the skier is flying in a complete stall..."
jack@csccat.UUCP (Jack Hudler) (07/06/88)
In article <5930009@hpcupt1.HP.COM> andrews@hpcupt1.HP.COM (Edward E. Andrews) writes: >How can I determine whether the FAT is using 12-bits or 16-bits per entry? >Is there a DOS call that specifically states: 12(16)-bit FAT, or does it >need to be infered (e.g. via DOS version [>3.2] or disk size [>32M])? You need the book MEMORY RESIDENT UTILITUES,INTERRUPTS, AND DISK MANAGMENT With MS&PC DOS. By Micheal Hyman, ISBN 0-943518-73-3, Published by Management Informations Sources, Inc 1107 N.W 14th Ave. Portland,Oregon 97209 +1 503 222 2399 This book goes into the disk rather well. A disk that uses a 12bit fat is usually a hard disk containing less than 31111 sectors per disk bytes 19 and 20 in the boot record. I personally dislike reading the boot record because there are a few disk managment drivers out there for partitioning hard drives that neglect in makeing a boot record on the non-bootable partition. I use the undocumented DOS call ah=32h dl=drive {0=def;1=a;2=b..} int21 ds:bx point to the drivers disk parameter block. Using this a disk system that uses 12 bit fats has less than 4087 for it's highest cluster - 1. Either way both have it's pit falls ;-). Jack Hudler -- See above (214)661-8960