delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2002/06/11/07:31:18

From: "Frank Troy Cook Jr." <fcook1 AT carolina DOT rr DOT com>
Newsgroups: comp.os.msdos.djgpp
Subject: bit and bytes ... help [ biosdisk ]
Lines: 27
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 5.00.2919.6700
X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2919.6700
Message-ID: <eGkN8.90451$6v2.3674113@twister.southeast.rr.com>
Date: Tue, 11 Jun 2002 10:55:06 GMT
NNTP-Posting-Host: 24.88.156.103
X-Complaints-To: abuse AT rr DOT com
X-Trace: twister.southeast.rr.com 1023792906 24.88.156.103 (Tue, 11 Jun 2002 06:55:06 EDT)
NNTP-Posting-Date: Tue, 11 Jun 2002 06:55:06 EDT
Organization: RoadRunner - Carolina
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

i need to extract drive information returned from a biosdisk call. for
example:

main()
{
        int count;
        char buffer[512];
        biosdisk(8, 0x80, 0, 0, 0, 1, buffer);
        for(count=0; count < 4; count++)
        {
                printf("%u ", buffer[count]);
        }
        printf("\n");
}

i understandfrom the djgpp site that the first 4 bytes return:
byte 0 = sectors per track (bits 0..5) and top two bits of cylinder (in bits
6..7)
byte 1 = cyliders (bits 0..7)
byte 2 = number of drives
byte 3 = number of heads
how do i convert this to integer numbers correctly?

please respond to fcook1SPAMBLOCK AT carolina DOT rr DOT com



- Raw text -


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