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

Back to Subject List

Thread Closed: Issue successfully resolved

???
04/04/07 23:30
Read: times


 
#136635 - Textbook time
Responding to: ???'s previous message
You need to use the 'pre' tags for code formatting - not 'quote'
See: http://www.8052.com/faqs.phtml?FAQ=120199

Shruthi Kumar said:
MSG_D = 03;
while( !( ReadRegister( MSG_D ) & 08 ) );  
MSG_E = 4;
does this mean that that the control comes out of the loop to "MSG_E =4;" if the value
"ReadRegister( MSG_D ) & 08" is = 11110111b


Why would it mean that?
Where does 11110111b come from?

The while is a standard 'C' construct that works the same on all targets - this has nothing specifically to do with 8051s!

The general form is:
while( <condition> ) <statement> ;
This means that <statement> will be repeated so long as <condition> is True.

In 'C', "True" means "non-zero"





List of 8 messages in thread
TopicAuthorDate
not within a while statement in 8051            01/01/70 00:00      
   Textbook time            01/01/70 00:00      
      sorry about that            01/01/70 00:00      
         08 is not a valid number!            01/01/70 00:00      
      Compound statements            01/01/70 00:00      
         Thanks            01/01/70 00:00      
   Beware of leading zeros!            01/01/70 00:00      
   Evaluate it yourself!            01/01/70 00:00      

Back to Subject List