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

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
05/23/07 22:03
Read: times


 
#139699 - compare two values, jump if greater or equal
Just wondering how to compare two bytes, and jump if greater or equal.

I know that this command exists in the avr's, but I haven't found a way to do it on 8051.

I want to compare DPH with value 75h, if result is equal or higher than 75h, jump to a routine.

I know about cjne, but I don't really care if it is equal, just higher.
mov a,dph
cjne a,#075h,Next       ;the dph byte may not equal 75, it may be
                        ;an unknown value higher than 75
sjmp blah blah blah...

Next:
blah blah blah...


anyone with any ideas?, links? I tried searching but too many answers, nothing specific to what I am looking for.


List of 11 messages in thread
TopicAuthorDate
compare two values, jump if greater or equal            01/01/70 00:00      
   "the bible" ch 2 gives the answer            01/01/70 00:00      
   compare & jump if higher            01/01/70 00:00      
      a goof            01/01/70 00:00      
      How about...            01/01/70 00:00      
   CLR C            01/01/70 00:00      
      compare and jump...            01/01/70 00:00      
      Why?            01/01/70 00:00      
      wrong!            01/01/70 00:00      
      no need            01/01/70 00:00      
   add a,#(0x100-0x75), jc ...            01/01/70 00:00      

Back to Subject List