??? 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 |