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

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
09/15/05 08:22
Read: times


 
#101094 - not atomic
Responding to: ???'s previous message
hi,

Peter Dannegger said:
use only read-modify-write instructions:
mov a, pin_value
orl a, #0F0h ;zero mask
orl p1, pin_value ;set one bits
anl p1, a ;clear zero bits


That`s correct but what if all bits must be changed simultaneously? Could you show a way how to change all bits with only one read-modify-write instruction?

Regards,
Oleg

List of 23 messages in thread
TopicAuthorDate
Week puzzle IV            01/01/70 00:00      
   In my opinion            01/01/70 00:00      
      no            01/01/70 00:00      
         Bufff!! then TRB            01/01/70 00:00      
            Me and my shadow, walking down the aven            01/01/70 00:00      
               You & your shadow            01/01/70 00:00      
                  http://www.coleporter.org/            01/01/70 00:00      
                     it's a hint            01/01/70 00:00      
   Well            01/01/70 00:00      
      you got it            01/01/70 00:00      
         Just OR with ones            01/01/70 00:00      
            how?            01/01/70 00:00      
   a simple solution:            01/01/70 00:00      
      not atomic            01/01/70 00:00      
         atomic not possible in general !            01/01/70 00:00      
   My solution!            01/01/70 00:00      
      Wrong            01/01/70 00:00      
      not atomic            01/01/70 00:00      
         Ok, here is the shadow            01/01/70 00:00      
            only four bits            01/01/70 00:00      
               2 Hints!            01/01/70 00:00      
                  Oh boy, do you need some bible time            01/01/70 00:00      
                  re: 2 Hints!            01/01/70 00:00      

Back to Subject List