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

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
11/02/03 23:48
Read: times


 
#57701 - RE: Comparing Registers
Responding to: ???'s previous message
Steve -

Thanks for the speedy reply. Please forgive my elementary knowledge of the 8051, but I'd like to clarify my understanding of your solution.

Let's say Mode 1 sets a value of 250 and Mode 2 sets a value of 255. If I use your solution and subtract 250 from the current Mode 1 value of 250, the result is 0 and thus the Carry is set to 1, correct? In which case the JC instruction would jump to another routine.

However, if the value of 255 is set while it is in Mode 1, 255 gets subtracted from 250 resulting in a negative number and the carry is also set, correct?

I guess I'm trying to understand exactly how the carry will be set based upon different results, ie: a positive result, a negative result, a result of 0 (in which case it is still in the same mode) etc..

Would you explain this better for me, please?

List of 7 messages in thread
TopicAuthorDate
Comparing Registers            01/01/70 00:00      
   RE: Comparing Registers            01/01/70 00:00      
      RE: Comparing Registers            01/01/70 00:00      
         RE: Comparing Registers            01/01/70 00:00      
            help            01/01/70 00:00      
               RE: help            01/01/70 00:00      
   RE: Comparing Registers            01/01/70 00:00      

Back to Subject List