Email: Password: Remember Me | Create Account (Free)

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
06/01/03 01:11
Read: times


 
#47148 - RE: Grabbing a bit from a byte?
Responding to: ???'s previous message
"The SDCC docs don't indicate to me what the C syntax is for this."

Of course they don't: the purpose of the Compiler manual is to tell you about the specifics of the Compiler - not to teach you the 'C' language!

You will need to read a 'C' textbook (and preferably attend a 'C' course) to find out about standard 'C' syntax.

The standard, portable 'C' way to test individual bits is by masking.
As already mentioned, the 8051 has certain bit-addressing facilities. This is where you do need to consult the Manual - to see if the compiler provides any special, non-standard language extensions to allow you to take advantage of this in 'C'.
Keil certainly does.

List of 10 messages in thread
TopicAuthorDate
Grabbing a bit from a byte?            01/01/70 00:00      
   RE: Grabbing a bit from a byte?            01/01/70 00:00      
   RE: Grabbing a bit from a byte?            01/01/70 00:00      
      RE: Grabbing a bit from a byte?            01/01/70 00:00      
         RE: Grabbing a bit from a byte?            01/01/70 00:00      
            RE: Grabbing a bit from a byte?            01/01/70 00:00      
         RE: Grabbing a bit from a byte?            01/01/70 00:00      
            RE: Grabbing a bit from a byte?            01/01/70 00:00      
            RE: Grabbing a bit from a byte?            01/01/70 00:00      
   RE: Grabbing a bit from a byte?            01/01/70 00:00      

Back to Subject List