We are running a survey to help us improve the experience for all of our members. If you see the survey appear, please take the time to tell us about your experience if you can.
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