Analog Devices adsp-2100 Manual page 323

Adsp-2100 family programmable single-chip microprocessors
Table of Contents

Advertisement

14 Software Examples
strt_shift: CNTR=Ntimes2 - 1;
shift_loop:
.ENDMOD;
Listing 14.8 Radix-2 Block Floating-Point Scaling Routine
14 – 20
AR=AX0-AY0,MX0=DM(I0,M1);
IF EQ JUMP strt_shift;
AX0=-2;
MY0=H#2000;
DO shift_loop UNTIL CE;
MR=MX0*MY0(RND),MX0=DM(I0,M1);
DM(I1,M1)=MR1;
MR=MX0*MY0(RND);
AY0=DM(blk_exponent);
DM(I1,M1)=MR1,AR=AY0-AX0;
DM(blk_exponent)=AR;
RTS;
{Check if SB=-1; Get 1st sample}
{If SB=-1, shift block data 1 bit}
{Set AX0 for block exponent update}
{Set MY0 to shift 2 bits right}
{initialize loop counter}
{Shift block of data}
{MR=shifted data,MX0=next value}
{Unshifted data=shifted data}
{Shift last data word}
{Update block exponent and}
{store last shifted sample}

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents