From: sparhawk AT eunet DOT at (Gerhard Gruber) Newsgroups: comp.os.msdos.djgpp Subject: Re: help with biosequip Date: Sat, 13 Jun 1998 09:53:21 GMT Organization: Customer of EUnet Austria Lines: 51 Message-ID: <358d4836.3596449@news.Austria.EU.net> References: <6lsfud$cbc$1 AT news1 DOT infoave DOT net> NNTP-Posting-Host: e170.dynamic.vienna.at.eu.net Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Precedence: bulk Destination: "Ming" From: Gruber Gerhard Group: comp.os.msdos.djgpp Date: Fri, 12 Jun 1998 20:09:11 -0400: > 1111 1100 0000 0000 > 5432 1098 7654 3210 Meaning > > ---- ---- ---- ---X 1 = disk drive(s) installed > ---- ---- ---- --X- 1 = math coprocessor installed > ---- ---- ---- XX-- System memory 00=16k 01=32k 10=48k 11=64k (non >PS/2) > ---- ---- ---- -X-- 1 = pointing device installed (PS/2) > ---- ---- ---- X--- not used on PS/2 > ---- ---- --XX ---- initial video mode: 01=CO40 10=CO80 11=MONO > ---- ---- XX-- ---- disk drives 00=1 01=2 10=3 11=4 (zero if bit 1=0) > ---- ---X ---- ---- 1 = no DMA available > ---- XXX- ---- ---- number of serial ports installed (000=0 001=1 etc) > ---X ---- ---- ---- 1 = game port adapter installed > --X- ---- ---- ---- 1 = internal modem installed (PS/2) > --X- ---- ---- ---- 1 = serial printer attached (non PS/2) > XX-- ---- ---- ---- number of printers installed (00=0 01=1 10=2 11=3) > > >I know a little c/c++ 4th year of college but we only do algoritms our >computer science department is more theory search alogarithms and things of >that nature not real coding so I am stuck learning any thing on my own >pretty much, just going to get the paper saying I studied computers to get a >job. > > >I have played with this even the examples but do not understand it. I do >know what bit code is but how do I use this. I need a clear understanding of >this. > >example what do I code to give cprintf("you have %d hard drives", >numbdrives); ((numbdrives >> 6) & 0x0003) + 1 This shifts the 2 bits, indicating the number of drives, to the first position and masks out all other bits that might be set. The +1 is needed because 0 = 1, 1 = 2 etc. -- Bye, Gerhard email: sparhawk AT eunet DOT at g DOT gruber AT sis DOT co DOT at Spelling corrections are appreciated.