Files
oldlinux-files/docs/interrupts/int-html/rb-0621.htm
2024-02-19 00:23:35 -05:00

255 lines
15 KiB
HTML

<HTML>
<HEAD>
<TITLE>Int 13/AH=08h
</TITLE>
<META NAME="Description" CONTENT="
Int 13/AH=08h - DISK - GET DRIVE PARAMETERS (PC,XT286,CONV,PS,ESDI,SCSI) -
AH = 08h
DL = drive (bit 7 set for hard disk)
ES:DI = 0000h:0000h to guard against BIOS bugs
Return: CF set on error
AH = status (07h) (see #00234)
CF clear if successful
AH = 00h
AL = 00h on at least some BIOSes
BL = drive type (AT/PS2 floppies only) (see #00242)
CH = low eight bits of maximum cylinder number
">
<META NAME="robots" CONTENT="none">
</HEAD>
<BODY BGCOLOR="#FFD0A0">
<center>
<h2>Int 13/AH=08h
</h2>
</center><p>
<table border=1 cellpadding=3 cellspacing=1>
<td>
<a href="rb-0620.htm" tppabs="http://www.ctyme.com/intr/rb-0620.htm">
<img src="lup.gif" tppabs="http://graphics.ctyme.com/gif/lup.gif" border=0 alt=Prev></a>
<a href="rb-0622.htm" tppabs="http://www.ctyme.com/intr/rb-0622.htm">
<img src="ldown.gif" tppabs="http://graphics.ctyme.com/gif/ldown.gif" border=0 alt=Next></a>
<a href="javascript:if(confirm('http://www.ctyme.com/rbrown.htm \n\nThis file was not retrieved by Teleport Pro, because it is addressed on a domain or path outside the boundaries set for its Starting Address. \n\nDo you want to open it from the server?'))window.location='http://www.ctyme.com/rbrown.htm'" tppabs="http://www.ctyme.com/rbrown.htm">
<img src="lhome.gif" tppabs="http://graphics.ctyme.com/gif/lhome.gif" border=0 alt=Ralf Brown Page></a>
<td><a href="int.htm" tppabs="http://www.ctyme.com/intr/int.htm">Interrups</a></td>
<td><a href="cat.htm" tppabs="http://www.ctyme.com/intr/cat.htm">Categories</a></td>
<td><a href="alpha.htm" tppabs="http://www.ctyme.com/intr/alpha.htm">Contents</a></td>
</td></table><p>
<p><img src="rbline.gif" tppabs="http://graphics.ctyme.com/gif/rbline.gif" width="100%" alt="------"><p>
<h3><font color=#C00040>DISK - GET DRIVE PARAMETERS (PC,XT286,CONV,PS,ESDI,SCSI)</font></h3>
<PRE>
AH = 08h
DL = drive (bit 7 set for hard disk)
ES:DI = 0000h:0000h to guard against BIOS bugs<br>
<p><b>Return:</b><br>CF set on error
AH = status (07h) <a href="rb-0606.htm#Table234" tppabs="http://www.ctyme.com/intr/rb-0606.htm#Table234">(see #00234)</a>
CF clear if successful
AH = 00h
AL = 00h on at least some BIOSes
BL = drive type (AT/PS2 floppies only) <a href="rb-0621.htm#Table242" tppabs="http://www.ctyme.com/intr/rb-0621.htm#Table242">(see #00242)</a>
CH = low eight bits of maximum cylinder number
CL = maximum sector number (bits 5-0)
high two bits of maximum cylinder number (bits 7-6)
DH = maximum head number
DL = number of drives
ES:DI -> drive parameter table (floppies only)
</PRE>
<p><b>Notes:</b>
May return successful even though specified drive is greater than the
number of attached drives of that type (floppy/hard); check DL to
ensure validity.
For systems predating the IBM AT, this call is only valid for hard
disks, as it is implemented by the hard disk BIOS rather than the
ROM BIOS.
The IBM ROM-BIOS returns the total number of hard disks attached
to the system regardless of whether DL >= 80h on entry..
Toshiba laptops with HardRAM return DL=02h when called with DL=80h,
but fail on DL=81h. The BIOS data at 40h:75h correctly reports 01h..
May indicate only two drives present even if more are attached; to
ensure a correct count, one can use AH=15h to scan through possible
drives.
Reportedly some Compaq BIOSes with more than one hard disk controller
return only the number of drives DL attached to the corresponding
controller as specified by the DL value on entry. However, on
Compaq machines with "COMPAQ" signature at F000h:FFEAh,
MS-DOS/PC DOS IO.SYS/IBMBIO.COM call INT 15/AX=E400h and
INT 15/AX=E480h to enable Compaq "mode 2" before retrieving the count
of hard disks installed in the system (DL) from this function..
The maximum cylinder number reported in CX is usually two less than
the total cylinder count reported in the fixed disk parameter table
(see INT 41h,INT 46h) because early hard disks used the last cylinder
for testing purposes; however, on some Zenith machines, the maximum
cylinder number reportedly is three less than the count in the fixed
disk parameter table..
For BIOSes which reserve the last cylinder for testing purposes, the
cylinder count is automatically decremented.
On PS/1s with IBM ROM DOS 4, nonexistent drives return CF clear,
BX=CX=0000h, and ES:DI = 0000h:0000h.
Machines with lost CMOS memory may return invalid data for floppy
drives. In this situation CF is cleared, but AX,BX,CX,DX,DH,DI,
and ES contain only 0. At least under some circumstances, MS-DOS/
PC DOS IO.SYS/IBMBIO.COM just assumes a 360 KB floppy if it sees
CH to be zero for a floppy..
The PC-Tools PCFORMAT program requires that AL=00h before it will
proceed with the formatting.
If this function fails, an alternative way to retrieve the number
of floppy drives installed in the system is to call INT 11h..
In fact, the MS-DOS/PC-DOS IO.SYS/IBMBIO.COM attempts to get the
number of floppy drives installed from INT 13/AH=08h, when INT 11h
AX bit 0 indicates there are no floppy drives installed. In addition
to testing the CF flag, it only trusts the result when the number of
sectors (CL preset to zero) is non-zero after the call.
<p><b>BUGS:</b>
Several different Compaq BIOSes incorrectly report high-numbered
drives (such as 90h, B0h, D0h, and F0h) as present, giving them the
same geometry as drive 80h; as a workaround, scan through disk
numbers, stopping as soon as the number of valid drives encountered
equals the value in 0040h:0075h.
A bug in Leading Edge 8088 BIOS 3.10 causes the DI,SI,BP,DS, and ES
registers to be destroyed.
Some Toshiba BIOSes (at least before 1995, maybe some laptops???
with 1.44 MB floppies) have a bug where they do not set the ES:DI
vector even for floppy drives. Hence these registers should be
preset with zero before the call and checked to be non-zero on
return before using them. Also it seems these BIOSes can return
wrong info in BL and CX, as S/DOS 1.0 can be configured to preset
these registers as for an 1.44 MB floppy..
The PS/2 Model 30 fails to reset the bus after INT 13/AH=08h and
INT 13/AH=15h. A workaround is to monitor for these functions
and perform a transparent INT 13/AH=01h status read afterwards.
This will reset the bus. The MS-DOS 6.0 IO.SYS takes care of
this by installing a special INT 13h interceptor for this purpose..
AD-DOS may leave interrupts disabled on return from this function..
Some Microsoft software explicitly sets STI after return.
<p><b>See Also:</b>
<a href="rb-0616.htm" tppabs="http://www.ctyme.com/intr/rb-0616.htm">AH=06h"Adaptec"</a> - <a href="rb-0637.htm" tppabs="http://www.ctyme.com/intr/rb-0637.htm">AH=13h"SyQuest"</a> - <a href="rb-0715.htm" tppabs="http://www.ctyme.com/intr/rb-0715.htm">AH=48h</a> - <a href="rb-0639.htm" tppabs="http://www.ctyme.com/intr/rb-0639.htm">AH
<p><b>See Also:</b>
<a href="rb-6135.htm" tppabs="http://www.ctyme.com/intr/rb-6135.htm">INT 41"HARD DISK 0"</a>
<PRE>
<p>
<a name=table242></a>
(Table 00242)
Values for diskette drive type:
01h 360K
02h 1.2M
03h 720K
04h 1.44M
05h ??? (reportedly an obscure drive type shipped on some IBM machines).
2.88M on some machines (at least AMI 486 BIOS)
06h 2.88M
10h ATAPI Removable Media Device
</PRE>
<p>
<b>Category: <a href="cat-003.htm" tppabs="http://www.ctyme.com/intr/cat-003.htm">
Bios</a>
- <a href="int-13.htm" tppabs="http://www.ctyme.com/intr/int-13.htm">
Int 13h</a>
- <a href="alpha-d.htm" tppabs="http://www.ctyme.com/intr/alpha-d.htm">
D</a>
</b><p><p><img src="rbline.gif" tppabs="http://graphics.ctyme.com/gif/rbline.gif" width="100%" alt="------"><p>
<table border=1 cellpadding=3 cellspacing=1>
<td>
<a href="rb-0620.htm" tppabs="http://www.ctyme.com/intr/rb-0620.htm">
<img src="lup.gif" tppabs="http://graphics.ctyme.com/gif/lup.gif" border=0 alt=Prev></a>
<a href="rb-0622.htm" tppabs="http://www.ctyme.com/intr/rb-0622.htm">
<img src="ldown.gif" tppabs="http://graphics.ctyme.com/gif/ldown.gif" border=0 alt=Next></a>
<a href="javascript:if(confirm('http://www.ctyme.com/rbrown.htm \n\nThis file was not retrieved by Teleport Pro, because it is addressed on a domain or path outside the boundaries set for its Starting Address. \n\nDo you want to open it from the server?'))window.location='http://www.ctyme.com/rbrown.htm'" tppabs="http://www.ctyme.com/rbrown.htm">
<img src="lhome.gif" tppabs="http://graphics.ctyme.com/gif/lhome.gif" border=0 alt=Ralf Brown Page></a>
<td><a href="int.htm" tppabs="http://www.ctyme.com/intr/int.htm">Interrups</a></td>
<td><a href="cat.htm" tppabs="http://www.ctyme.com/intr/cat.htm">Categories</a></td>
<td><a href="alpha.htm" tppabs="http://www.ctyme.com/intr/alpha.htm">Contents</a></td>
</td></table><p>
<!-- Bottom Link Start -->
<center>
<p><table border=1 bgcolor="#ffff99"><tr><td>
<table border=0 height=80>
<tr align=center><td width="65">
<a href="javascript:if(confirm('http://www.ctyme.com/sponsor.htm \n\nThis file was not retrieved by Teleport Pro, because it is addressed on a domain or path outside the boundaries set for its Starting Address. \n\nDo you want to open it from the server?'))window.location='http://www.ctyme.com/sponsor.htm'" tppabs="http://www.ctyme.com/sponsor.htm">
<img src="tip.gif" tppabs="http://graphics.ctyme.com/gif/tip.gif" ALT="Sponsors" height="40" width="40"></a>
<br><a href="javascript:if(confirm('http://www.ctyme.com/sponsor.htm \n\nThis file was not retrieved by Teleport Pro, because it is addressed on a domain or path outside the boundaries set for its Starting Address. \n\nDo you want to open it from the server?'))window.location='http://www.ctyme.com/sponsor.htm'" tppabs="http://www.ctyme.com/sponsor.htm">Shopping</a>
</td><td width="65">
<a href="javascript:if(confirm('http://talk.ctyme.com/webx.cgi?13@@.ee6b2be \n\nThis file was not retrieved by Teleport Pro, because it is addressed on a domain or path outside the boundaries set for its Starting Address. \n\nDo you want to open it from the server?'))window.location='http://talk.ctyme.com/webx.cgi?13@@.ee6b2be'" tppabs="http://talk.ctyme.com/webx.cgi?13@@.ee6b2be">
<img src="comment.gif" tppabs="http://graphics.ctyme.com/gif/comment.gif" ALT="Forum" height="40" width="40"></a>
<br><a href="javascript:if(confirm('http://talk.ctyme.com/webx.cgi?13@@.ee6b2be \n\nThis file was not retrieved by Teleport Pro, because it is addressed on a domain or path outside the boundaries set for its Starting Address. \n\nDo you want to open it from the server?'))window.location='http://talk.ctyme.com/webx.cgi?13@@.ee6b2be'" tppabs="http://talk.ctyme.com/webx.cgi?13@@.ee6b2be">Forum</a>
</td><td width="65">
<a href="javascript:if(confirm('http://www.ctyme.com/mail.htm \n\nThis file was not retrieved by Teleport Pro, because it is addressed on a domain or path outside the boundaries set for its Starting Address. \n\nDo you want to open it from the server?'))window.location='http://www.ctyme.com/mail.htm'" tppabs="http://www.ctyme.com/mail.htm">
<img src="mail.gif" tppabs="http://graphics.ctyme.com/gif/mail.gif" ALT="email" height="40" width="40"></a>
<br><a href="javascript:if(confirm('http://www.ctyme.com/mail.htm \n\nThis file was not retrieved by Teleport Pro, because it is addressed on a domain or path outside the boundaries set for its Starting Address. \n\nDo you want to open it from the server?'))window.location='http://www.ctyme.com/mail.htm'" tppabs="http://www.ctyme.com/mail.htm">EMail</a>
</td><td width="65">
<a href="javascript:if(confirm('http://www.ctyme.com/map.htm \n\nThis file was not retrieved by Teleport Pro, because it is addressed on a domain or path outside the boundaries set for its Starting Address. \n\nDo you want to open it from the server?'))window.location='http://www.ctyme.com/map.htm'" tppabs="http://www.ctyme.com/map.htm">
<img src="toc.gif" tppabs="http://graphics.ctyme.com/gif/toc.gif" ALT="Index" height="40" width="40"></a>
<br><a href="javascript:if(confirm('http://www.ctyme.com/map.htm \n\nThis file was not retrieved by Teleport Pro, because it is addressed on a domain or path outside the boundaries set for its Starting Address. \n\nDo you want to open it from the server?'))window.location='http://www.ctyme.com/map.htm'" tppabs="http://www.ctyme.com/map.htm">Index</a>
</td><td width="65">
<a href="javascript:if(confirm('http://www.ctyme.com/ \n\nThis file was not retrieved by Teleport Pro, because it is addressed on a domain or path outside the boundaries set for its Starting Address. \n\nDo you want to open it from the server?'))window.location='http://www.ctyme.com/'" tppabs="http://www.ctyme.com/">
<img src="home.gif" tppabs="http://graphics.ctyme.com/gif/home.gif" ALT="Home" height="40" width="40"></a>
<br><a href="javascript:if(confirm('http://www.ctyme.com/ \n\nThis file was not retrieved by Teleport Pro, because it is addressed on a domain or path outside the boundaries set for its Starting Address. \n\nDo you want to open it from the server?'))window.location='http://www.ctyme.com/'" tppabs="http://www.ctyme.com/">Home</a>
</td><td width="90">
<center>
<FORM ACTION="https://secure.paypal.com/cgi-bin/webscr" tppabs="https://secure.paypal.com/cgi-bin/webscr" METHOD="POST" traget="_blank">
<INPUT TYPE="hidden" NAME="cmd" VALUE="_xclick">
<INPUT TYPE="hidden" NAME="business" VALUE="marc@perkel.com">
<INPUT TYPE="hidden" NAME="return" VALUE="http://www.perkel.com">
<INPUT TYPE="hidden" NAME="item_name" VALUE="Donation To Support this Site">
<INPUT TYPE="hidden" NAME="no_intl" VALUE="1">
<INPUT TYPE="image" SRC="x-click-but7.gif" tppabs="http://images.paypal.com/images/x-click-but7.gif" vspace=9
NAME="submit" ALT="Make payments with PayPal - it's fast, free and secure!">
</FORM>
</td></tr></table></td></tr></table><p>
<center>
<p>
<a href="javascript:if(confirm('http://www.ctyme.com/hosting/index.htm \n\nThis file was not retrieved by Teleport Pro, because it is addressed on a domain or path outside the boundaries set for its Starting Address. \n\nDo you want to open it from the server?'))window.location='http://www.ctyme.com/hosting/index.htm'" tppabs="http://www.ctyme.com/hosting/index.htm" target="_blank">
<img src="ctymehost.gif" tppabs="http://graphics.ctyme.com/gif/ctymehost.gif"
border=3 height=60 width=468></a>
<p>
<!-- Ad End --->
</center>
<FORM ACTION="http://service.bfast.com/bfast/click" target="_blank">
<INPUT TYPE="hidden" NAME="siteid" VALUE="30472466" >
<INPUT TYPE="hidden" NAME="bfpage" VALUE="horizontal">
<INPUT TYPE="hidden" NAME="bfmid" VALUE="27253343" >
<INPUT TYPE="hidden" NAME="num" VALUE="30">
<table bgcolor=white border=3><tr><td>
<table bgcolor=white border=0>
<tr><td>
<IMG SRC="serve-bfmid=27253343&siteid=30472466&bfpage=horizontal.gif" tppabs="http://service.bfast.com/bfast/serve?bfmid=27253343&siteid=30472466&bfpage=horizontal" BORDER="0" WIDTH="1" HEIGHT="1" align=right NOSAVE >
<center><b>Search the web with Google</b></center>
</td></tr><tr><td>
<TABLE cellpadding=0 cellspacing=5 bgcolor="#FFFFFF">
<tr><td bgcolor="#0000cc"><IMG SRC="cleardot.gif" tppabs="http://www.google.com/images/cleardot.gif" height=1 border="0" ALT="Google"></td></tr><tr><td>
<IMG SRC="affiliate_logo.gif" tppabs="http://www.google.com/affiliates/affiliate_logo.gif" border="0" ALT="Google" align="center">
<INPUT TYPE=text name=q size=30 maxlength=255 value="">
<INPUT type=submit name=sa VALUE="Go">
</td></tr>
<tr><td bgcolor="#0000cc"><IMG SRC="cleardot.gif" tppabs="http://www.google.com/images/cleardot.gif" height=1 border="0" ALT="Google"></td></tr></TABLE>
</td></tr></table>
</tr></td></table>
</FORM>
</center>
<p><img src="rbline.gif" tppabs="http://graphics.ctyme.com/gif/rbline.gif" width="100%" alt="------"><p>
<!-- Bottom Link End -->
</BODY>
</HTML>