Discussion:
Int 13h function 08h - Read drive parameters
(too old to reply)
EricFa
2008-10-30 06:35:42 UTC
Permalink
When I read out my drive parameters with the eigth function, I get a
response, like there is only one head, although I know exactly, that
my harddisk has got 16 of them.
:-) AX returns 00h, BX 00h, CX C2C4h and DX 0101h, when I call
function 8 with Interrupt 13h. Here are the Functionparameters from
PhoenixBIOS 4.0 User's Manual:

Interrupt 13h–Fixed Disk Services, Continued
AH = 08h Read drive parameters
Entry:
DL Drive number (80H-81H)
Exit:
CL Maximum sector number
CH Maximum cylinder number
(High bits in CL)
DH Maximum head number
DL Number of responding drives (0-2)
If Carry - 1:
AH 07h = Invalid drive number
AL 0 = Error
CX 0 = Error
DX 0 = Error

According to the parameterinformation I should get 010h instead of 01h
in DH returned.
I somewhere read, the function would place the drive type in BX. But I
am not sure about, what my BIOS does exactly.
The Carry-flag is not set, so there should be no error occuring in the
function itself.
Tim Roberts
2008-10-31 05:00:55 UTC
Permalink
Post by EricFa
When I read out my drive parameters with the eigth function, I get a
response, like there is only one head, although I know exactly, that
my harddisk has got 16 of them.
I find that hard to believe. I haven't seen a hard disk with 9 platters
since my mainframe days.
Post by EricFa
:-) AX returns 00h, BX 00h, CX C2C4h and DX 0101h, when I call
function 8 with Interrupt 13h. Here are the Functionparameters from
INT 13 function 8 can handle drives up to 500 MB. (That's 0.5 GB.) INT 13
function 48 can handle drives up to 8 GB. INT 13 is basically useless for
any drive made in the last decade.
--
Tim Roberts, ***@probo.com
Providenza & Boekelheide, Inc.
H. Peter Anvin
2008-10-31 06:02:53 UTC
Permalink
Post by Tim Roberts
Post by EricFa
When I read out my drive parameters with the eigth function, I get a
response, like there is only one head, although I know exactly, that
my harddisk has got 16 of them.
I find that hard to believe. I haven't seen a hard disk with 9 platters
since my mainframe days.
The number of "heads" produced on modern drives is complete fiction.
Post by Tim Roberts
Post by EricFa
:-) AX returns 00h, BX 00h, CX C2C4h and DX 0101h, when I call
function 8 with Interrupt 13h. Here are the Functionparameters from
INT 13 function 8 can handle drives up to 500 MB. (That's 0.5 GB.) INT 13
function 48 can handle drives up to 8 GB. INT 13 is basically useless for
any drive made in the last decade.
Wrong on all counts.

INT 13h functions 0xh can handle drives up to 8 GiB (2^24 sectors.)

INT 13h functions 4xh can handle drives up to 8 ZiB (2^64 sectors.)

-hpa
Rod Pemberton
2008-10-31 07:33:50 UTC
Permalink
Post by Tim Roberts
INT 13 function 8 can handle drives up to 500 MB. (That's 0.5 GB.) INT
13 function 48 can handle drives up to 8 GB. INT 13 is basically useless
for any drive made in the last decade.
Basically useless? Even if INT13 can't access more than those amounts, INT
13 is still useful for accessing those amounts or less. INT 13 is more than
sufficient to setup disk partitions, install a small OS, install a DOS based
recovery partition, or create partitions for installation or swap space for
a larger OS, etc.


Rod Pemberton
Rod Pemberton
2008-10-31 07:34:10 UTC
Permalink
Post by EricFa
When I read out my drive parameters with the eigth function, I get a
response, like there is only one head, although I know exactly, that
my harddisk has got 16 of them.
:-) AX returns 00h, BX 00h, CX C2C4h and DX 0101h, when I call
function 8 with Interrupt 13h. Here are the Functionparameters from
Interrupt 13h–Fixed Disk Services, Continued
AH = 08h Read drive parameters
DL Drive number (80H-81H)
CL Maximum sector number
CH Maximum cylinder number
(High bits in CL)
DH Maximum head number
DL Number of responding drives (0-2)
AH 07h = Invalid drive number
AL 0 = Error
CX 0 = Error
DX 0 = Error
Are you familiar with Ralf Brown's Interrupt List (aka RBIL)? The RBIL
description of INT 13h, AH=0x08 provides much more information:
http://www.delorie.com/djgpp/doc/rbinter/id/27/6.html
Post by EricFa
According to the parameter information I should get 010h instead of 01h
in DH returned.
This might be due to CHS or LBA translation. Search for Phoenix's EDD
specification which describes CHS and LBA translation or try reading Hale
Landis' CHS translation webpage which describes ten different types of
translations used by BIOSes. Both go through the math demonstrating the
528MB (for INT 13h, ah=0xh) and 8GB limits (for INT 13h, ah=4xh). Landis'
page is here:
http://ata-atapi.com/hiwchs.html

(Also, I have to agree w/ Tim Roberts on the number of physical heads. The
last two MFM's I disassembled many years ago had four platters - probably 8
heads. And, the most platters I've seen in an IDE is two.)
Post by EricFa
I somewhere read, the function would place the drive type in BX.
RBIL description above says BL is for floppies...

FYI, RBIL in different formats:

RBIL files: http://www.cs.cmu.edu/afs/cs/user/ralf/pub/WWW/files.html
MP html: http://www.ctyme.com/rbrown.htm
DJ html: http://www.delorie.com/djgpp/doc/rbinter/


Rod Pemberton
EricFa
2008-10-31 15:37:47 UTC
Permalink
OK, thanks for the help.
I will try function 48h. ...

Loading...