www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1998/07/01/14:53:03

From: MetcalJM AT utrc DOT utc DOT com
Date: Wed, 01 Jul 1998 14:52:35 -0400
Subject: Bios Geometry
To: djgpp AT delorie DOT com
Cc: metcalf AT snet DOT net
Message-id: <C77AD5DA2AA7D111859D00805FA72468033685@EXPRESS7>
MIME-version: 1.0

Hi,

I was wondering if anyone can explain a strange phenomenon to me.
I am using the cmd 8 to the "int biosdisk" library function (header in
<bios.h>) to retrieve the geometry of my hard drive. What I receive
back, tells me that my geometry is:

cyls: 522    (return val 521 + 1 for starting at 0)
heads: 64   (return val 63 + 1 for starting at 0)
secs/track: 63 (return val 63 + 0 for starting at 1)

I've used two other utilities to confirm these parameters.  They
report the correct number of heads and secs/track, however, the
number of cylinders is off by 1.  (They are reporting 523).  Other
calculations based on the size of my partitions also seem to agree 
with the 523 number.  

Can anyone tell me why biosdisk, which I understand uses the 
DOS INT 0x13 call, is reporting 1 less than the proper number or
cylinders?

Here's more info on my system and gcc:

My BIOS uses LBA, so the real geometry is   c: 2095   h: 16   s/t: 63
b/s: 512
gcc version 2.8.1


Thank You for any ideas you can provide.

Reagrds,

JM
> -------------
> Jeffrey M. Metcalf
> United Technologies Research Center
> metcaljm AT utrc DOT utc DOT com
> (860) 610-7576
> 
> 

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019