Mail Archives: djgpp/1994/05/25/15:46:55
> Isn't 512 the true disk blocksize? If not, is 4096 always the correct
> value, or does it vary depending on how the disk is layed out? Is
> there a way to ask DOS and fill this field in correctly?
Int 0x21, ah=0x1b will return sector size (normally 512), sectors per cluster
and total clusters. The second varies with the size of the disk. It's 2048
for disks larger than 16MB but smaller than 128MB, and doubles every time the
disk size doubles, assuming a FAT disk. I'm not sure what result you get
with a HPFS disk. I do know that for a CD-ROM disk, sectors per cluster is 4
and the total clusters is set to 0xffff because the right answer won't fit in
16 bits.
- Raw text -