di2739.txt ;*************************************************************************************************** ; LISTING 1 - BIT-REVERSE ALGORITHM ; ; "Routine yields fast bit reversing for DSP algorithms," EDN, Sept 13, 2001, pg 78 ; ;********************************************************************************************* #define BRmod //bit-reverse of N/2, N-length of input data #define in-arry //bit-reversed address of input data location #define out-arry //address of output array #define N //length of input data BR-Algorithm: bit set mode1 BR0; //this allows BR-mode b0=in-arry; l0=0; m0=BRmod; //this is circular buffers b8=out-arry; l8=N; m8=1; r0=dm(i0,m0); lcntr = (N-1), do br until lce; //this is a loop counter br: r0=dm(i0,m0), pm(i8,m8)=r0; pm(i8,m8)=r0; bit clr mode1 BR0; //this clears the BR-mode