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

how to do array operation on 10 bit data using dptr and registers in at89c51

I am doing permutation using at89c51.In this i have to give 10 bit input
Let positions of the bits are [ 1 2 3 4 5 6 7 8 9 10 ]
i need to produce an array
P10: 10-10 [ 3 5 2 7 4 10 1 9 8 6 ] where 1 to digits are the bit positions
for example i am giving input to dptr using " mov dptr,#1101010011b "
i have to get output 0010111101.
i tried mov a,r2.2 mov r4.0,a which are not valid.because we can't do bit operations using register r0-r7.so please suggest me the instructions