delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2000/03/03/09:17:29

From: "Peter Stewart" <peters AT goldenriver DOT com>
Newsgroups: comp.os.msdos.djgpp
Subject: bit masking
Date: Sat, 4 Mar 2000 13:01:17 -0000
Organization: RemarQ http://www.remarQ.com
Lines: 31
Message-ID: <89od42$bvp$1@supernews.com>
NNTP-Posting-Host: 195.72.160.126
Mime-Version: 1.0
X-Trace: 952088514 5YRYRMC7OA07EC348C uk25.supernews.com
X-Complaints-To: newsabuse AT remarq DOT com
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 5.00.2314.1300
X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2314.1300
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

int err;
.
.
.


data=_bios_serialcom(_COM_RECEIVE,0,0); /*read from com1*/

if(err=(data&0x1300))
{
    switch(err)
    {
        case 0x0100: /* bit 9 */ break;
        case 0x0200: /* bit 10 */ break;
        case 0x0300: /* bit 11 */ break;
        case 0x1000: /* bit 15 */ break;
        default: /* eek some other top bit */ break;
    }
}
else
{
    /* data OK */
}


Regards,


Peter


- Raw text -


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