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

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
06/14/07 12:59
Modified:
  06/14/07 13:05

Read: times


 
Msg Score: +1
 +1 Good Answer/Helpful
#140756 - cjne a,direct,displacement
Responding to: ???'s previous message
Direct is any data in RAM 0-0x7F or SFR.

The traditional method is:
   mov  r0,#address0
   mov  r1,#address1
   mov  r2,#size
loop:
   mov  a,@r0
   mov  b,@r1
   cjne a,b,exit
   inc  r0         ;or dec, depending on endianness
   inc  r1
   djnz r2,loop
   ;equal at this point
exit:
   jnc  @address0_is_bigger
   ;@address0_is_smaller


JW


List of 10 messages in thread
TopicAuthorDate
Comparing data with cjne...            01/01/70 00:00      
   cjne a,direct,displacement            01/01/70 00:00      
      Thanks            01/01/70 00:00      
         it does            01/01/70 00:00      
            Indeed            01/01/70 00:00      
               Alternative solution            01/01/70 00:00      
                  Sure?            01/01/70 00:00      
                     Surely not.            01/01/70 00:00      
                  That`s wrong            01/01/70 00:00      
         you could as well use also direct RAM            01/01/70 00:00      

Back to Subject List