This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

#not control in A51

Could someone help me with the following:

mov a,#not 0x08

will simply place the value 0x08 into accumulator. The following however does not work and I would like to know why:

bit_mask equ 0x08

mov a,#not #bit_mask

The reason it does not work has to do with the #not.

I make extensive use of bit flags stored externally in xram. To set one of these flags is relatively simple using orl a,#bit_flag_mask. But to clear the flag I would have liked to use anl a,#not #bit_flag_mask. Instead I have to do the following:

mov a,#bit_flag_mask
cpl a
mov b,a
movx a,@dptr
anl a,b
movx @dptr,a

Thank you in advance
Joe