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

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
05/27/04 07:42
Read: times


 
#71318 - DO *NOT* DO THIS!
Responding to: ???'s previous message
Dan Henry said:
I won't comment on the wisdom of relying on CY to behave the way you expect

But that is the key issue here!

You CANNOT rely on the content of the Carry Flag in 'C'!


http://www.8052.com/forum/read.phtml?id=62273

If you really need to rely on specific instructions and/or specific values in specific processor registers, you MUST use assembler!

http://www.8052.com/forum/read.phtml?id=68927

Dropping a bit of inline assembler into a 'C' file is little better - you are still relying on what you hope the compiler may have left in the registers.

Do it properly in a proper assembler module

Or, understand the 'C' language properly, and look at the standard operators and library functions included with the compiler.
In Keil, look at the Intrinsic Functions

List of 14 messages in thread
TopicAuthorDate
Rotate thru carry in C            01/01/70 00:00      
   RE: Rotate thru carry in C            01/01/70 00:00      
   RE: Rotate thru carry in C            01/01/70 00:00      
      RE: Rotate thru carry in C            01/01/70 00:00      
         RE: Rotate thru carry in C            01/01/70 00:00      
         RE: Rotate thru carry in C            01/01/70 00:00      
            DO *NOT* DO THIS!            01/01/70 00:00      
               RE: DO *NOT* DO THIS!            01/01/70 00:00      
            RE: Rotate thru carry in C            01/01/70 00:00      
   RE: Rotate thru carry in C            01/01/70 00:00      
   Wrong approach.            01/01/70 00:00      
   RE: so often            01/01/70 00:00      
   Also on the Keil forum            01/01/70 00:00      
      Link trouble again            01/01/70 00:00      

Back to Subject List