Hi,
I'm reading Andrew N. Sloss's book .
There is a description about Bit Permutation. I extrat several lines of code here:
7.6.2.1 Bit PermutationMacros mask0 EQU 0x55555555 ; set bit positions with b0=0 mask1 EQU 0x33333333 ; set bit positions with b1=0 mask2 EQU 0x0F0F0F0F ; set bit positions with b2=0 mask3 EQU 0x00FF00FF ; set bit positions with b3=0 mask4 EQU 0x0000FFFF ; set bit positions with b4=0MACRO PERMUTE_B $j, $k ; [ .. b_j .. b_k .. ] -> [ .. b_k .. b_j .. ] and j>k LDR m, =(mask$j:AND::NOT:mask$k) ; set when b_j=0 b_k=1 EOR t, n, n, LSR#(1 [b3b2b1b0b4] MOV pc, lr
he used PERMUTE_B macro to achieve bit_spread operation. But what is bit spread? Can anybody give me a defintion please? Thanks!
--------------------------------------- Posted through