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

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
11/17/08 11:55
Read: times


 
#160082 - WHY TO DISTURB ACC ?
Responding to: ???'s previous message
Dear Alan,

Charles Townsend said:
Alan Dorman said:
I know you can SETB C
and SETB Px.x
or ACC.x

But can I SETB 34H.x
a direct memory register bit?

ATMEL AT89C4051



why don't you try this:

mov a,034h
setb acc.x
mov 034h,a
 


is this what you are looking for?


The solution provided by Mr. Charles is correct, still I will not opt for it. As it destroys content of accumulator.

I would prefer to do it as follows...

to set a bit to 1, I will do...
ORL 34H,#XX ;here XX is 8 bit number with required bit 1, & remaining bits zeros

Similarly to clear a bit to zero I will do...
ANL 34h,#yy ;here yy is 8 bit number with required bit 0, & remaining bits ones

for complimenting perticular bit, I will do...
XRL 34h,#zz ;here zz is 8 bit number with required bit 1, & remaining bits zeros

This way I can manipulate the required bit, without disturbing anyother registor / memory.

Regrads,
Mahesh



List of 34 messages in thread
TopicAuthorDate
a simple SETB question            01/01/70 00:00      
   SETB from 20h to 2FH            01/01/70 00:00      
      assembler missed this one            01/01/70 00:00      
         I know of none that can't            01/01/70 00:00      
   what about this?            01/01/70 00:00      
      try ORL to set any bit in internal RAM            01/01/70 00:00      
         wrong, nonstandard and why            01/01/70 00:00      
            ORL, Set any bit (more informative)            01/01/70 00:00      
               iram            01/01/70 00:00      
                  Where is that defined?            01/01/70 00:00      
                     my word was not 'defined' but            01/01/70 00:00      
                        a rose, by any other name ...            01/01/70 00:00      
                           I think Erik has it?            01/01/70 00:00      
                              aliased/overlayed            01/01/70 00:00      
                                 Fair enough            01/01/70 00:00      
                              pDATA?            01/01/70 00:00      
                                 Why do you think 64TB would be enough?            01/01/70 00:00      
                                    It would not be            01/01/70 00:00      
                                       Tools are important for size            01/01/70 00:00      
                                          That's why there's ASM to use instead            01/01/70 00:00      
                                       this flies against some previous posts of yours            01/01/70 00:00      
                                          It's like herding cats            01/01/70 00:00      
                                             Flame bait?            01/01/70 00:00      
                                                No ... not really            01/01/70 00:00      
                                                   yes            01/01/70 00:00      
                                 PDATA & XDATA            01/01/70 00:00      
                                    I won't argue that ... but ...            01/01/70 00:00      
                                       Agreed, but...            01/01/70 00:00      
                                          It is seldom that simple ...            01/01/70 00:00      
                                             That's the point!            01/01/70 00:00      
                                             since you are really interested            01/01/70 00:00      
                                                Thanks!            01/01/70 00:00      
      Yes, that is the way I normally do it            01/01/70 00:00      
      WHY TO DISTURB ACC ?            01/01/70 00:00      

Back to Subject List