Lets see if anyone can help me... 
Author Message
 Lets see if anyone can help me...

How can you determine the # allocation units on an HD ??
Is there a ratio or something ??
And also to determine how many bites in each allocation unit ??

Tim Henson,
Young Programmer age 16 (17 in Under a month)



Wed, 18 Jun 1902 08:00:00 GMT  
 Lets see if anyone can help me...



Quote:

> How can you determine the # allocation units on an HD ??
> Is there a ratio or something ??
> And also to determine how many bites in each allocation unit ??

Programatically, I'm not sure, but if you are running under win/95
then the following commands will calculate your allocation size:

type in:
 COPY CON TEMP.DAT
press enter
type in:
 A
press Control+Z
press enter
type in:
 DIR /v TEMP.DAT
press enter

Your screen will display a line like:

TEMP     DAT     1     xxxxxxx    <other stuff here>

where xxxxxxx=allocation size. I have 2 partitions, my first allocates
at 16,384(16K) the other at 8,192 (8K) I have a conversion table
for drive size => allocation size, and I will look for it if you want me
to (mail me is U do)
--
News Reader Silverstone



Wed, 18 Jun 1902 08:00:00 GMT  
 Lets see if anyone can help me...

Quote:


> How can you determine the # allocation units on an HD ??
> Is there a ratio or something ??
> And also to determine how many bites in each allocation unit ??

The maximum number of allocation units DOS has is 64K. Each allocation unit
is known as cluster. Each custer is a group of sectors.

For a 800Mb harddisk, lets divide it into clusters.

800Mb = 65535 clusters * 12.8Kb

But there's no cluster size of 12.8Kb, we have 2K, 4K, 8K, 16K and 32K.

We rephase it as

800Mb = 51200 clusters * 16Kb
1.5Gb = 49152 clusters * 32Kb

See, the cluster size is 16Kb and total number of allocatable clusters are
51200.

800Mb can also means :-
800Mb = 25600 clusters * 32Kb

However, some utitlities offer to change the cluster size(wonder who would
do that). In this case, you'll have to refer to DOS reference for thoses
BPB stuffs.
Look at Ralf Brown's Interrupt List.

From Vinson ABS.



Wed, 18 Jun 1902 08:00:00 GMT  
 Lets see if anyone can help me...

Quote:

>How can you determine the # allocation units on an HD ??
>Is there a ratio or something ??
>And also to determine how many bites in each allocation unit ??

uses Dos;
var regs : Dos.Registers;

procedure DiscInfo;
begin with regs do begin
  ah:= $1B; MsDos(regs);
  writeln('  Clusters/disk   : ', dx);
  writeln('  Sectors/cluster : ', al);
  writeln('  Bytes/sector    : ', cx);
  writeln('  ==> total bytes : ', longint(dx) *
                                  longint(al) *
                                  longint(cx));
  ah:= $36; dl:= 0; MsDos(regs);
  writeln('  Available space : ', bx,' clusters = ',
                                  longint(bx) *
                                  longint(ax) *
                                  longint(cx), ' byte = ',
                                  100.0*bx/dx:4:1,'%');
end end;

Bob Ferguson.

-----------------------------------------
J.R. Ferguson, Amsterdam, The Netherlands

web: www.xs4all.nl/~ferguson
Freeware for DOS and Windows



Wed, 18 Jun 1902 08:00:00 GMT  
 
 [ 4 post ] 

 Relevant Pages 

1. Lets see if anyone can help me...

2. OODBMS for Delphi - anyone seen one yet?

3. Anyone seen a Pascal Patch for windows NT?

4. freeware checkbox for dbgrid : anyone seen one?

5. It's not bad canned meat...

6. NT NOT letting go - HELP!!!!!

7. Can we do programming without seeing the end u

8. i need help on pascal anyone can help?

9. Inserted record no being seen

10. Paradox record posted not seen by 2nd workstation

11. Help variable reads too far THANX to anyone who tries to help

12. CD seen as non-ready drive

 

 
Powered by phpBB® Forum Software