KnowledgeBase Archive

An Archive of Early Microsoft KnowledgeBase Articles

View on GitHub

Q39311: Use 0x80 to Access Drive C when Calling _bios_disk

Article: Q39311
Product(s): See article
Version(s): 5.00 5.10
Operating System(s): MS-DOS
Keyword(s): ENDUSER | S_QUICKC | mspl13_c
Last Modified: 29-DEC-1988

Question:

I am using the _bios_disk function to access my fixed disk. I have
initialized the drive parameter to 2 to specify my fixed-disk drive.
This function does not seem to be accessing my fixed disk. What am I
doing wrong?

Response:

The first floppy drive in a computer is identified as drive 0 with
additional floppy drives numbered sequentially. However, the first
fixed disk is identified as drive 0x80 (128 decimal) with additional
partitions numbered sequentially. Therefore, call _bios_disk with the
drive parameter set to 0x80 to access the first fixed disk.

The following is an example:

   Logical Drive    diskinfo.drive
         A                 0
         B                 1
         C                0x80
         D                0x81
         E                0x82
         .                 .
         .                 .
         .                 .

THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

Copyright Microsoft Corporation 1986-2002.