home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.lang.c++
- Path: sparky!uunet!gumby!wupost!monsanto.com!skcla.monsanto.com!sbgros
- From: sbgros@skcla.monsanto.com
- Subject: looking at bits
- Message-ID: <1992Nov18.105341.1@skcla.monsanto.com>
- Lines: 21
- Sender: news@tin.monsanto.com (USENET News System)
- Organization: Searle, Skokie, IL
- Date: Wed, 18 Nov 1992 10:53:41 GMT
-
- I'm using borland c++ to perform some communication functions.
- I'm only experimenting right now though. I'm using the bioscom
- function to test for different conditions. The qeustion I have is.
- How to I read the bits of a 16-bit integer. The example in the
- book shows that 0x100 is bit 5 (I think that what its refering to),
- but anyway how do I figure out what the hex address is for the bits
- 0-15?
-
- the next part of my problem for the future is.
-
- the function returns this 16-bit integer what I store in a register,
- for quick access, then I use an if statement to see if something
- is true if (status & 0x100) how do these compare to give me a true
- or false. I've looked in the book but very vaige (sp) .
-
- any and all help would be super !!
-
- thanks
-
- scott
-
-